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/block_transaction_test.exs

18 lines
483 B

defmodule Explorer.BlockTransactionTest do
use Explorer.DataCase
alias Explorer.BlockTransaction
describe "changeset/2" do
test "with empty attributes" do
changeset = BlockTransaction.changeset(%BlockTransaction{}, %{})
refute(changeset.valid?)
end
test "with valid attributes" do
attrs = %{block_id: 4, transaction_id: 3}
changeset = BlockTransaction.changeset(%BlockTransaction{}, attrs)
assert(changeset.valid?)
end
end
end