Commits

Shantanu Kumar committed ef876de

update tests to stop using with-connection (removed from dbspec)

Comments (0)

Files changed (1)

src/test/clj/org/bituf/fountain/test_jdbc.clj

 
 (defmacro with-stmt
   [st & body]
-  `(sp/with-connection
-     (with-open [~st (.createStatement ^Connection (:connection sp/*dbspec*))]
-       ~@body)))
+  `((sp/wrap-connection
+      (fn []
+        (with-open [~st (.createStatement ^Connection (:connection sp/*dbspec*))]
+          ~@body)))))
 
 
 (defn setup
       (let [sji (jd/make-sji :sample :gencols :sample-id)]
         (is (= [1 1]
               (jd/insert-batch sji [{:name "Hello" :age 20}
-                                    {:name "World" :age 30}])))
-        ))))
+                                    {:name "World" :age 30}])))))))
 
 
 (defn test-ns-hook []