Skip to content
Snippets Groups Projects
Unverified Commit ea5b6a6b authored by Cam Saul's avatar Cam Saul
Browse files

MongoDB test fix

parent e7e9c808
Branches
Tags
No related merge requests found
......@@ -80,9 +80,10 @@
(deftest field-filter-test
(testing "Date ranges"
(is (= "[{$match: {$and: [{\"date\": {$gte: ISODate(\"2019-12-08\")}}, {\"date\": {$lt: ISODate(\"2019-12-12\")}}]}}]"
(substitute {:date (field-filter "date" :date/range "past5days")}
["[{$match: " (param :date) "}]"]))))
(mt/with-clock #t "2019-12-13T12:00:00.000Z[UTC]"
(is (= "[{$match: {$and: [{\"date\": {$gte: ISODate(\"2019-12-08\")}}, {\"date\": {$lt: ISODate(\"2019-12-12\")}}]}}]"
(substitute {:date (field-filter "date" :date/range "past5days")}
["[{$match: " (param :date) "}]"])))))
(testing "multiple values"
(doseq [[message v] {"values are a vector of numbers" [1 2 3]
"comma-separated numbers" (comma-separated-numbers [1 2 3])}]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment