Skip to content

Commit

Permalink
Add a test for a query that produces a nil :db/id
Browse files Browse the repository at this point in the history
  • Loading branch information
devurandom committed May 20, 2019
1 parent da2fb70 commit 96b91c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/datascript/test/query_or.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@
(and [2 :age ?a]
[?e :name "Oleg"]))
[?e :age ?a]]
#{1 5 4}))
#{1 5 4}

[[?top :name "Ivan"]
[?top :age 10]
[(or ?e ?top)]]
#{}))

(deftest test-or-join
(are [q res] (= (d/q (concat '[:find ?e :where] (quote q)) @test-db)
Expand Down Expand Up @@ -157,4 +162,4 @@
(d/q '[:find ?e
:where (or-join [[?e]]
[?e :name "Ivan"])]
@test-db))))
@test-db))))

0 comments on commit 96b91c2

Please sign in to comment.