From d0ae02a6ef6a4d134de9e67de1f2d1c342a5031c Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sat, 17 Dec 2022 00:15:11 -0800 Subject: [PATCH] more tests --- test/honey/sql_test.cljc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/honey/sql_test.cljc b/test/honey/sql_test.cljc index 8fe0621..be2d003 100644 --- a/test/honey/sql_test.cljc +++ b/test/honey/sql_test.cljc @@ -884,7 +884,13 @@ ORDER BY id = ? DESC {:params {:y [nil]}}))) (is (= ["WHERE x IN (?)" nil] (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" (is (thrown-with-msg? ExceptionInfo #"does not match" (format {:where [:in :x [nil]]}