add value test
This commit is contained in:
parent
d74f2d2437
commit
0c89c0362e
1 changed files with 8 additions and 0 deletions
|
|
@ -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))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue