Skip to content

Commit e9e21e1

Browse files
committed
Add unit test
1 parent ae07dba commit e9e21e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/xitdb/cursor_test.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@
2424
(swap! cursor1 assoc-in [3 :hidden] :changed-by-swap!)
2525
(is (= [1 2 3 {:hidden :changed-by-swap!} 5]) (xdb/materialize @cursor1))
2626
(is (= :changed-by-swap! @cursor3))
27-
(is (= 3 @cursor2))))))
27+
(is (= 3 @cursor2)))
28+
29+
(testing "Correctly handles invalid cursor path"
30+
(is (thrown? IndexOutOfBoundsException @(xdb/xdb-cursor db [:foo :bar 999])))))))

0 commit comments

Comments
 (0)