Added test case for distinct to exercise non-query distinct API
The existing test cases only covered the form (distinct ... :field
{query}). This chance adds a test for the non-query form also.
This commit is contained in:
parent
a67f6de06b
commit
ce6dcd27cb
1 changed files with 1 additions and 0 deletions
|
|
@ -134,6 +134,7 @@
|
|||
{:state "CA" :quantity 2 :price 2.95 }
|
||||
{:state "IL" :quantity 3 :price 5.50 }]]
|
||||
(mc/insert-batch db collection batch)
|
||||
(is (= ["CA" "IL" "NY"] (sort (mc/distinct db collection :state))))
|
||||
(is (= ["CA" "IL" "NY"] (sort (mc/distinct db collection :state {}))))
|
||||
(is (= ["CA" "NY"] (sort (mc/distinct db collection :state {:price {$gt 100.00}}))))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue