more tests

This commit is contained in:
Sean Corfield 2022-12-17 00:15:11 -08:00
parent c62f5da3f8
commit d0ae02a6ef

View file

@ -884,7 +884,13 @@ ORDER BY id = ? DESC
{:params {:y [nil]}}))) {:params {:y [nil]}})))
(is (= ["WHERE x IN (?)" nil] (is (= ["WHERE x IN (?)" nil]
(format {:where [:in :x :?y]} (format {:where [:in :x :?y]}
{:params {:y [nil]} :checking :basic})))) {:params {:y [nil]} :checking :basic})))
(is (= ["WHERE x IN ($2)" nil nil]
(format {:where [:in :x :?y]}
{:params {:y [nil]} :numbered true})))
(is (= ["WHERE x IN ($2)" nil nil]
(format {:where [:in :x :?y]}
{:params {:y [nil]} :checking :basic :numbered true}))))
(testing "IN NULL is flagged in strict mode" (testing "IN NULL is flagged in strict mode"
(is (thrown-with-msg? ExceptionInfo #"does not match" (is (thrown-with-msg? ExceptionInfo #"does not match"
(format {:where [:in :x [nil]]} (format {:where [:in :x [nil]]}