aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/conn_test.exs4
-rw-r--r--test/mkllst_test.exs7
2 files changed, 4 insertions, 7 deletions
diff --git a/test/conn_test.exs b/test/conn_test.exs
index a8cda43..ff746b7 100644
--- a/test/conn_test.exs
+++ b/test/conn_test.exs
@@ -5,10 +5,6 @@ defmodule ShardTest.Conn do
require Salty.Box.Curve25519xchacha20poly1305, as: Box
require Salty.Sign.Ed25519, as: Sign
- test "the truth" do
- assert 1 + 1 == 2
- end
-
test "crypto connection" do
{:ok, srv_pkey, srv_skey} = Sign.keypair
{:ok, sess_pkey, sess_skey} = Box.keypair
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