aboutsummaryrefslogtreecommitdiff
path: root/test/mkllst_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/mkllst_test.exs')
-rw-r--r--test/mkllst_test.exs7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/mkllst_test.exs b/test/mkllst_test.exs
index 7d1fadf..4df25df 100644
--- a/test/mkllst_test.exs
+++ b/test/mkllst_test.exs
@@ -5,11 +5,12 @@ defmodule ShardTest.MklLst do
test "merkle list" do
{:ok, pid} = GenServer.start(SData.MerkleList, &SData.MerkleList.cmp_ts_str/2)
- {:ok, list, rt} = GenServer.call(pid, {:read, nil, nil})
- assert list == []
- assert rt == nil
+ {:ok, [], nil} = GenServer.call(pid, {:read, nil, nil})
GenServer.cast(pid, {:insert, {12, "aa, bb"}})
GenServer.cast(pid, {:insert_many, [{14, "qwerty"}, {8, "haha"}]})
+ GenServer.cast(pid, {:insert, {14, "qwerty"}})
+ {:ok, list, nil} = GenServer.call(pid, {:read, nil, nil})
+ assert length(list) == 3
end
end