|
|
|
@ -21,7 +21,7 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
test "with invalid address hash", %{conn: conn} do |
|
|
|
|
conn = get(conn, address_read_contract_path(BlockScoutWeb.Endpoint, :index, "invalid_address")) |
|
|
|
|
conn = get(conn, address_read_proxy_path(BlockScoutWeb.Endpoint, :index, "invalid_address")) |
|
|
|
|
|
|
|
|
|
assert html_response(conn, 404) |
|
|
|
|
end |
|
|
|
@ -29,7 +29,7 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do |
|
|
|
|
test "with valid address that is not a contract", %{conn: conn} do |
|
|
|
|
address = insert(:address) |
|
|
|
|
|
|
|
|
|
conn = get(conn, address_read_contract_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash))) |
|
|
|
|
conn = get(conn, address_read_proxy_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash))) |
|
|
|
|
|
|
|
|
|
assert html_response(conn, 404) |
|
|
|
|
end |
|
|
|
@ -50,8 +50,7 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do |
|
|
|
|
|
|
|
|
|
insert(:smart_contract, address_hash: contract_address.hash) |
|
|
|
|
|
|
|
|
|
conn = |
|
|
|
|
get(conn, address_read_contract_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) |
|
|
|
|
conn = get(conn, address_read_proxy_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) |
|
|
|
|
|
|
|
|
|
assert html_response(conn, 200) |
|
|
|
|
assert contract_address.hash == conn.assigns.address.hash |
|
|
|
@ -72,8 +71,7 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do |
|
|
|
|
block_index: 0 |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
conn = |
|
|
|
|
get(conn, address_read_contract_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) |
|
|
|
|
conn = get(conn, address_read_proxy_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) |
|
|
|
|
|
|
|
|
|
assert html_response(conn, 404) |
|
|
|
|
end |
|
|
|
|