mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 00:41:12 +00:00
Polish tests
This commit is contained in:
parent
90e2d3b0ae
commit
161fd1dfb0
1 changed files with 4 additions and 9 deletions
|
|
@ -15,40 +15,35 @@
|
||||||
(deftest errors-test
|
(deftest errors-test
|
||||||
|
|
||||||
(are [exception]
|
(are [exception]
|
||||||
(are [error routes opts]
|
(are [error routes]
|
||||||
(is (thrown-with-msg?
|
(is (thrown-with-msg?
|
||||||
ExceptionInfo
|
ExceptionInfo
|
||||||
error
|
error
|
||||||
(r/router
|
(r/router
|
||||||
routes
|
routes
|
||||||
(merge {:exception exception} opts))))
|
{:validate rs/validate
|
||||||
|
:exception exception})))
|
||||||
|
|
||||||
#"Router contains conflicting route paths"
|
#"Router contains conflicting route paths"
|
||||||
[["/:a/1"]
|
[["/:a/1"]
|
||||||
["/1/:a"]]
|
["/1/:a"]]
|
||||||
nil
|
|
||||||
|
|
||||||
#"Router contains conflicting route names"
|
#"Router contains conflicting route names"
|
||||||
[["/kikka" ::kikka]
|
[["/kikka" ::kikka]
|
||||||
["/kukka" ::kikka]]
|
["/kukka" ::kikka]]
|
||||||
nil
|
|
||||||
|
|
||||||
#":reitit.trie/multiple-terminators"
|
#":reitit.trie/multiple-terminators"
|
||||||
[["/{a}.pdf"]
|
[["/{a}.pdf"]
|
||||||
["/{a}-pdf"]]
|
["/{a}-pdf"]]
|
||||||
nil
|
|
||||||
|
|
||||||
#":reitit.trie/following-parameters"
|
#":reitit.trie/following-parameters"
|
||||||
["/{a}{b}"]
|
["/{a}{b}"]
|
||||||
nil
|
|
||||||
|
|
||||||
#":reitit.trie/unclosed-brackets"
|
#":reitit.trie/unclosed-brackets"
|
||||||
["/api/{ipa"]
|
["/api/{ipa"]
|
||||||
nil
|
|
||||||
|
|
||||||
#"Invalid route data"
|
#"Invalid route data"
|
||||||
["/api/ipa" {::roles #{:adminz}}]
|
["/api/ipa" {::roles #{:adminz}}])
|
||||||
{:validate rs/validate})
|
|
||||||
|
|
||||||
exception/exception
|
exception/exception
|
||||||
pretty/exception))
|
pretty/exception))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue