mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +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
|
||||
[["/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)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue