more test cleanup
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
d1115c8c42
commit
16c1faeaf6
1 changed files with 10 additions and 5 deletions
|
|
@ -2,13 +2,18 @@
|
|||
|
||||
(ns next.jdbc.types-test
|
||||
"Some tests for the type-assist functions."
|
||||
(:require [lazytest.experimental.interfaces.clojure-test :refer [deftest is]]
|
||||
(:require [lazytest.core :refer [defdescribe describe it expect]]
|
||||
[next.jdbc.types :refer [as-varchar]]))
|
||||
|
||||
(set! *warn-on-reflection* true)
|
||||
|
||||
(deftest as-varchar-test
|
||||
(defdescribe as-varchar-tests
|
||||
(let [v (as-varchar "Hello")]
|
||||
(is (= "Hello" (v)))
|
||||
(is (contains? (meta v) 'next.jdbc.prepare/set-parameter))
|
||||
(is (fn? (get (meta v) 'next.jdbc.prepare/set-parameter)))))
|
||||
(describe "produces a function"
|
||||
(it "yields the original value when invoked"
|
||||
(expect (fn? v))
|
||||
(expect (= "Hello" (v)))))
|
||||
(describe "carries metadata"
|
||||
(it "has a `set-parameter` function"
|
||||
(expect (contains? (meta v) 'next.jdbc.prepare/set-parameter))
|
||||
(expect (fn? (get (meta v) 'next.jdbc.prepare/set-parameter)))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue