From 0c89c0362e7d5ad6fe9471356560e724165d07cb Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Tue, 31 Mar 2015 10:32:48 -0700 Subject: [PATCH] add value test --- test/honeysql/core_test.clj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/honeysql/core_test.clj b/test/honeysql/core_test.clj index e58c49c..d7c5543 100644 --- a/test/honeysql/core_test.clj +++ b/test/honeysql/core_test.clj @@ -67,3 +67,11 @@ (sql/format {:select [:foo (sql/call :cast :bar :integer)]}))) (is (= ["SELECT foo, CAST(bar AS integer)"] (sql/format {:select [:foo (sql/call :cast :bar 'integer)]})))) + +(deftest test-value + (is (= ["INSERT INTO foo (bar) VALUES (?)" {:baz "my-val"}] + (-> + (insert-into :foo) + (columns :bar) + (values [[(honeysql.format/value {:baz "my-val"})]]) + sql/format))))