Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/test/explorer_web/controllers/internal_transaction_contro...

22 lines
791 B

defmodule ExplorerWeb.InternalTransactionControllerTest do
use ExplorerWeb.ConnCase
import ExplorerWeb.Router.Helpers, only: [transaction_internal_transaction_path: 4]
describe "GET index/2" do
test "returns internal transactions for the transaction", %{conn: conn} do
transaction = insert(:transaction)
internal_transaction = insert(:internal_transaction, transaction_id: transaction.id)
path =
transaction_internal_transaction_path(ExplorerWeb.Endpoint, :index, :en, transaction.hash)
conn = get(conn, path)
first_internal_transaction = List.first(conn.assigns.internal_transactions)
assert conn.assigns.transaction_hash == transaction.hash
assert first_internal_transaction.id == internal_transaction.id
end
end
end