parent
8e8b4b5508
commit
49f99b1400
@ -0,0 +1,17 @@ |
||||
defmodule Phoenix.Param.Explorer.Chain.BlockTest do |
||||
use ExUnit.Case |
||||
|
||||
import Explorer.Factory |
||||
|
||||
test "without consensus" do |
||||
block = build(:block, consensus: false) |
||||
|
||||
assert Phoenix.Param.to_param(block) == to_string(block.hash) |
||||
end |
||||
|
||||
test "with consensus" do |
||||
block = build(:block, consensus: true) |
||||
|
||||
assert Phoenix.Param.to_param(block) == to_string(block.number) |
||||
end |
||||
end |
Loading…
Reference in new issue