From fb95a1e303690a023224ceaad6bef160f1683c3f Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Sun, 23 Sep 2018 11:27:33 +0300 Subject: [PATCH] Test top-level handler override --- test/cljc/reitit/swagger_test.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cljc/reitit/swagger_test.clj b/test/cljc/reitit/swagger_test.clj index e531c6e6..ac0cd90f 100644 --- a/test/cljc/reitit/swagger_test.clj +++ b/test/cljc/reitit/swagger_test.clj @@ -188,10 +188,12 @@ (ring/router [["/ping" {:options (constantly "options")}] + ["/pong" + (constantly "options")] ["/swagger.json" {:get {:no-doc true :handler (swagger/create-swagger-handler)}}]]))] - (is (= ["/ping"] (spec-paths app "/swagger.json"))) + (is (= ["/ping" "/pong"] (spec-paths app "/swagger.json"))) (is (= #{::swagger/default} (-> {:request-method :get :uri "/swagger.json"} (app) :body :x-id)))))