From 6af0da5bd2b16d95e1d71ac9940d0545150973f3 Mon Sep 17 00:00:00 2001 From: jimmay5469 Date: Mon, 9 Jul 2018 14:32:37 -0400 Subject: [PATCH] Add test with pending contract creation --- .../test/explorer_web/features/viewing_transactions_test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs b/apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs index fcd96496dc..db86e96352 100644 --- a/apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs +++ b/apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs @@ -19,6 +19,7 @@ defmodule ExplorerWeb.ViewingTransactionsTest do |> with_block() pending = insert(:transaction, block_hash: nil, gas: 5891, index: nil) + pending_contract = insert(:transaction, to_address: nil, block_hash: nil, gas: 5891, index: nil) lincoln = insert(:address) taft = insert(:address) @@ -51,6 +52,7 @@ defmodule ExplorerWeb.ViewingTransactionsTest do {:ok, %{ pending: pending, + pending_contract: pending_contract, internal: internal, lincoln: lincoln, taft: taft, @@ -95,11 +97,12 @@ defmodule ExplorerWeb.ViewingTransactionsTest do |> refute_has(TransactionListPage.transaction(pending)) end - test "viewing the pending tab", %{pending: pending, session: session} do + test "viewing the pending tab", %{pending: pending, pending_contract: pending_contract, session: session} do session |> TransactionListPage.visit_page() |> TransactionListPage.click_pending() |> assert_has(TransactionListPage.transaction(pending)) + |> assert_has(TransactionListPage.transaction(pending_contract)) end test "contract creation is shown for to_address on list page", %{session: session} do