From 161fd1dfb0edb01eeb79876f758a9d016c85ad70 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Sun, 3 Mar 2019 21:58:17 +0200 Subject: [PATCH] Polish tests --- test/cljc/reitit/exception_test.cljc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/cljc/reitit/exception_test.cljc b/test/cljc/reitit/exception_test.cljc index 462085d1..971bd63d 100644 --- a/test/cljc/reitit/exception_test.cljc +++ b/test/cljc/reitit/exception_test.cljc @@ -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))