mirror of
https://github.com/metosin/reitit.git
synced 2025-12-24 10:58:25 +00:00
Test all working paths with static-handlers
This commit is contained in:
parent
49e8d273ac
commit
e295861fe5
1 changed files with 5 additions and 1 deletions
|
|
@ -284,7 +284,7 @@
|
|||
(ring/create-resource-handler {:path "/files"})
|
||||
(ring/create-resource-handler {:path "/"})
|
||||
(ring/create-default-handler)))]]
|
||||
prefix ["/" "/files"]
|
||||
prefix ["" "/" "/files" "/files/"]
|
||||
:let [request (fn [uri] {:uri (str prefix uri), :request-method :get})]]
|
||||
|
||||
(testing test
|
||||
|
|
@ -300,6 +300,10 @@
|
|||
|
||||
(testing "index-files"
|
||||
(let [response (app (request "/docs"))]
|
||||
(is (= "text/html" (get-in response [:headers "Content-Type"])))
|
||||
(is (get-in response [:headers "Last-Modified"]))
|
||||
(is (= "<h1>hello</h1>\n" (slurp (:body response)))))
|
||||
(let [response (app (request "/docs/"))]
|
||||
(is (= "text/html" (get-in response [:headers "Content-Type"])))
|
||||
(is (get-in response [:headers "Last-Modified"]))
|
||||
(is (= "<h1>hello</h1>\n" (slurp (:body response))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue