add json schema tests to token controller

pull/2576/head
saneery 5 years ago
parent d0b59997e7
commit a753e1467b
  1. 22
      apps/block_scout_web/test/block_scout_web/controllers/api/rpc/token_controller_test.exs

@ -84,4 +84,26 @@ defmodule BlockScoutWeb.API.RPC.TokenControllerTest do
assert response["message"] == "OK"
end
end
defp gettoken_schema do
ExJsonSchema.Schema.resolve(%{
"type" => "object",
"properties" => %{
"message" => %{"type" => "string"},
"status" => %{"type" => "string"},
"result" => %{
"type" => "object",
"properties" => %{
"name" => %{"type" => "string"},
"symbol" => %{"type" => "string"},
"totalSupply" => %{"type" => "string"},
"decimals" => %{"type" => "string"},
"type" => %{"type" => "string"},
"cataloged" => %{"type" => "string"},
"contractAddress" => %{"type" => "string"}
}
}
}
})
end
end

Loading…
Cancel
Save