Skip to content

Commit 82bccbd

Browse files
committed
Correcting a test-case to work with Clojure 1.5.
1 parent 9471f12 commit 82bccbd

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

test/yesql/core_test.clj

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,24 @@
3737
:? [0 0]}))
3838

3939
;;; Test Metadata.
40-
(expect {:doc "Just selects the current time.\nNothing fancy."
41-
:arglists (list '[]
42-
'[{} {:keys [connection]}])}
43-
(in (meta (var current-time-query))))
40+
(expect (more-> "Just selects the current time.\nNothing fancy." :doc
41+
'current-time-query :name
42+
(list '[] '[{} {:keys [connection]}]) :arglists)
43+
(meta (var current-time-query)))
4444

45-
(expect {:doc "Here's a query with some named and some anonymous parameters.\n(...and some repeats.)"
46-
:name 'mixed-parameters-query
47-
:arglists (list '[{:keys [? value2 value1]}]
48-
'[{:keys [? value2 value1]} {:keys [connection]}])}
49-
(in (meta (var mixed-parameters-query))))
45+
(expect (more-> "Here's a query with some named and some anonymous parameters.\n(...and some repeats.)" :doc
46+
'mixed-parameters-query :name
47+
true (-> :arglists list?)
48+
;; TODO We could improve the clarity of what this is testing.
49+
2 (-> :arglists count)
50+
51+
1 (-> :arglists first count)
52+
#{'? 'value1 'value2} (-> :arglists first first :keys set)
53+
54+
2 (-> :arglists second count)
55+
#{'? 'value1 'value2} (-> :arglists second first :keys set)
56+
#{'connection} (-> :arglists second second :keys set))
57+
(meta (var mixed-parameters-query)))
5058

5159
;; Running a query in a transaction and using the result outside of it should work as expected.
5260
(expect-let [[{time :time}] (jdbc/with-db-transaction [connection derby-db]

0 commit comments

Comments
 (0)