Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yatender-oktalk/2e7df5eaf38ac43ca83935dd0929d701 to your computer and use it in GitHub Desktop.
Save yatender-oktalk/2e7df5eaf38ac43ca83935dd0929d701 to your computer and use it in GitHub Desktop.
defmodule ExChain.BlockchainTest do
....
test "validate a chain", %{blockchain: blockchain} do
# add block into blockchain
blockchain = Blockchain.add_block(blockchain, "some-block-data")
# assert if blockchain is valid
assert Blockchain.valid_chain?(blockchain)
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment