Skip to content

Commit

Permalink
Polish tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ikitommi committed Mar 3, 2019
1 parent 90e2d3b commit 161fd1d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/cljc/reitit/exception_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,35 @@
(deftest errors-test

(are [exception]
(are [error routes opts]
(are [error routes]
(is (thrown-with-msg?
ExceptionInfo
error
(r/router
routes
(merge {:exception exception} opts))))
{:validate rs/validate
:exception exception})))

#"Router contains conflicting route paths"
[["/:a/1"]
["/1/:a"]]
nil

#"Router contains conflicting route names"
[["/kikka" ::kikka]
["/kukka" ::kikka]]
nil

#":reitit.trie/multiple-terminators"
[["/{a}.pdf"]
["/{a}-pdf"]]
nil

#":reitit.trie/following-parameters"
["/{a}{b}"]
nil

#":reitit.trie/unclosed-brackets"
["/api/{ipa"]
nil

#"Invalid route data"
["/api/ipa" {::roles #{:adminz}}]
{:validate rs/validate})
["/api/ipa" {::roles #{:adminz}}])

exception/exception
pretty/exception))

0 comments on commit 161fd1d

Please sign in to comment.