From ed223a57585ad4421bde7ec0da9dab81445235f4 Mon Sep 17 00:00:00 2001 From: Chris Kilding Date: Tue, 28 May 2019 18:02:04 +0100 Subject: [PATCH] Demonstrate that empty arrays do not generate the right SQL --- test/honeysql/format_test.cljc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/honeysql/format_test.cljc b/test/honeysql/format_test.cljc index f6d1f76..7f515e3 100644 --- a/test/honeysql/format_test.cljc +++ b/test/honeysql/format_test.cljc @@ -83,6 +83,10 @@ ["SELECT id FROM foo WHERE EXISTS (SELECT ? FROM bar WHERE deleted)" 1]))) (deftest array-test + (is (= (format {:insert-into :foo + :columns [:baz] + :values [[(sql/array [])]]}) + ["INSERT INTO foo (baz) VALUES ('{}')"])) (is (= (format {:insert-into :foo :columns [:baz] :values [[(sql/array [1 2 3 4])]]})