From f8a2eedf45c6597e77ced6f02c24e9ea2aeb2c83 Mon Sep 17 00:00:00 2001 From: Michael Blume Date: Tue, 9 Feb 2016 14:05:34 -0800 Subject: [PATCH] demonstrate incorrect raw/call behavior --- test/honeysql/core_test.clj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/honeysql/core_test.clj b/test/honeysql/core_test.clj index 12b55d9..f0ec2b1 100644 --- a/test/honeysql/core_test.clj +++ b/test/honeysql/core_test.clj @@ -153,3 +153,15 @@ {:param1 param1 :param2 param2 :param3 param3}))))) + +(deftest test-raw + (is (= ["1 + 1"] + (-> (select (sql/raw "1 + 1")) + (from :foo) + sql/format)))) + +(deftest test-call + (is (= ["min(?)" "time"] + (-> (select (sql/call :min "time")) + (from "table") + sql/format))))