Skip to content

Commit ee169ff

Browse files
committed
Finish the test
1 parent cb74f19 commit ee169ff

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

test/xitdb/map_test.clj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55

66
(deftest map-with-complex-keys
77
(with-db [db (tu/test-db)]
8-
(reset! db {:foo {{:bar :baz} 42}})
9-
#_(reset! db {:foo {[1 :bar] 31
10-
[2 :baz] 42}})))
8+
(testing "Composite values as keys"
9+
(reset! db {:foo {{:bar :baz} 42}})
10+
(is (= {:foo {{:bar :baz} 42}}
11+
(tu/materialize @db)))
12+
13+
(reset! db {:foo {[1 :bar] 31
14+
[2 :baz] 42}})
15+
(is (= {:foo {[1 :bar] 31
16+
[2 :baz] 42}}
17+
(tu/materialize @db)))
18+
19+
(swap! db update :foo dissoc [2 :baz])
20+
21+
(is (= {:foo {[1 :bar] 31}}
22+
(tu/materialize @db))))))

0 commit comments

Comments
 (0)