mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +00:00
Test top-level handler override
This commit is contained in:
parent
b24e5ed856
commit
fb95a1e303
1 changed files with 3 additions and 1 deletions
|
|
@ -188,10 +188,12 @@
|
||||||
(ring/router
|
(ring/router
|
||||||
[["/ping"
|
[["/ping"
|
||||||
{:options (constantly "options")}]
|
{:options (constantly "options")}]
|
||||||
|
["/pong"
|
||||||
|
(constantly "options")]
|
||||||
["/swagger.json"
|
["/swagger.json"
|
||||||
{:get {:no-doc true
|
{:get {:no-doc true
|
||||||
:handler (swagger/create-swagger-handler)}}]]))]
|
:handler (swagger/create-swagger-handler)}}]]))]
|
||||||
(is (= ["/ping"] (spec-paths app "/swagger.json")))
|
(is (= ["/ping" "/pong"] (spec-paths app "/swagger.json")))
|
||||||
(is (= #{::swagger/default}
|
(is (= #{::swagger/default}
|
||||||
(-> {:request-method :get :uri "/swagger.json"}
|
(-> {:request-method :get :uri "/swagger.json"}
|
||||||
(app) :body :x-id)))))
|
(app) :body :x-id)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue