mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
Support also booleans, more tests
This commit is contained in:
parent
5ef30443ef
commit
f547576a44
2 changed files with 21 additions and 3 deletions
|
|
@ -187,6 +187,10 @@
|
|||
(when (namespace this) "/")
|
||||
(name this)))
|
||||
|
||||
#?(:clj Boolean
|
||||
:cljs boolean)
|
||||
(into-string [this] (str this))
|
||||
|
||||
#?(:clj Number
|
||||
:cljs number)
|
||||
(into-string [this] (str this))
|
||||
|
|
|
|||
|
|
@ -29,12 +29,26 @@
|
|||
|
||||
(deftest path-params-test
|
||||
(is (= {:n "1"
|
||||
:n1 "-1"
|
||||
:n2 "1"
|
||||
:n3 "1"
|
||||
:n4 "1"
|
||||
:n5 "1"
|
||||
:d "2.2"
|
||||
:b "true"
|
||||
:s "kikka"
|
||||
:u "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||
:k "kikka"
|
||||
:qk "reitit.impl-test%2Fkikka"}
|
||||
(impl/path-params {:n 1
|
||||
:n1 -1
|
||||
:n2 (long 1)
|
||||
:n3 (int 1)
|
||||
:n4 (short 1)
|
||||
:n5 (byte 1)
|
||||
:d 2.2
|
||||
:b true
|
||||
:s "kikka"
|
||||
:u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e"
|
||||
:k :kikka
|
||||
:qk ::kikka}))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue