mirror of
https://github.com/metosin/reitit.git
synced 2026-02-05 03:43:12 +00:00
.
This commit is contained in:
parent
a8a96c0e85
commit
0cafb9639d
3 changed files with 2 additions and 9 deletions
|
|
@ -246,9 +246,3 @@
|
||||||
[["/a"] ["/a"]]))))
|
[["/a"] ["/a"]]))))
|
||||||
(testing "can be configured to ignore"
|
(testing "can be configured to ignore"
|
||||||
(is (not (nil? (r/router [["/a"] ["/a"]] {:conflicts (constantly nil)})))))))
|
(is (not (nil? (r/router [["/a"] ["/a"]] {:conflicts (constantly nil)})))))))
|
||||||
|
|
||||||
(testing "nil routes are stripped"
|
|
||||||
(is (= [] (r/routes (r/router nil))))
|
|
||||||
(is (= [] (r/routes (r/router [nil ["/ping"]]))))
|
|
||||||
(is (= [] (r/routes (r/router [nil [nil] [[nil nil nil]]]))))
|
|
||||||
(is (= [] (r/routes (r/router ["/ping" [nil "/pong"]])))))
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
[clojure.set :as set]
|
[clojure.set :as set]
|
||||||
[reitit.middleware :as middleware]
|
[reitit.middleware :as middleware]
|
||||||
[reitit.ring :as ring]
|
[reitit.ring :as ring]
|
||||||
[reitit.core :as r]
|
[reitit.core :as r])
|
||||||
[clojure.string :as str])
|
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(:import (clojure.lang ExceptionInfo))))
|
(:import (clojure.lang ExceptionInfo))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
{:conflicts (fn [_])}
|
{:conflicts (fn [_])}
|
||||||
{:router r/linear-router})
|
{:router r/linear-router})
|
||||||
|
|
||||||
#_(are [opts]
|
(are [opts]
|
||||||
(is (thrown-with-msg?
|
(is (thrown-with-msg?
|
||||||
ExceptionInfo
|
ExceptionInfo
|
||||||
#"Call to #'reitit.core/router did not conform to spec"
|
#"Call to #'reitit.core/router did not conform to spec"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue