|
|
@ -3,17 +3,17 @@ defmodule ExplorerWeb.InternalTransactionViewTest do |
|
|
|
|
|
|
|
|
|
|
|
alias ExplorerWeb.InternalTransactionView |
|
|
|
alias ExplorerWeb.InternalTransactionView |
|
|
|
|
|
|
|
|
|
|
|
describe "contract?/1" do |
|
|
|
describe "create?/1" do |
|
|
|
test "with internal transaction of type create returns true" do |
|
|
|
test "with internal transaction of type create returns true" do |
|
|
|
internal_transaction = build(:internal_transaction_create) |
|
|
|
internal_transaction = build(:internal_transaction_create) |
|
|
|
|
|
|
|
|
|
|
|
assert InternalTransactionView.contract?(internal_transaction) |
|
|
|
assert InternalTransactionView.create?(internal_transaction) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
test "with non-create type internal transaction returns false" do |
|
|
|
test "with non-create type internal transaction returns false" do |
|
|
|
internal_transaction = build(:internal_transaction) |
|
|
|
internal_transaction = build(:internal_transaction) |
|
|
|
|
|
|
|
|
|
|
|
refute InternalTransactionView.contract?(internal_transaction) |
|
|
|
refute InternalTransactionView.create?(internal_transaction) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|