Skip to content

Commit 1705461

Browse files
committed
Fix assertions not in a deftest
1 parent 546ac8d commit 1705461

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/ring/middleware/defaults_test.clj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@
179179
(is (not (realized? ex)))
180180
(is (= @resp {:status 200
181181
:headers {"Content-Type" "application/octet-stream"}
182-
:body "foo"})))))
183-
184-
(testing "XSS protection enabled"
185-
(let [handler (-> (constantly (response "foo"))
186-
(wrap-defaults
187-
(-> site-defaults
188-
(assoc-in [:security :xss-protection :enable?] true)
189-
(assoc-in [:security :xss-protection :mode] :block))))
190-
resp (handler (request :get "/"))]
191-
(is (not (nil? (get-in resp [:headers "X-XSS-Protection"]))))
192-
(is (= (get-in resp [:headers "X-XSS-Protection"]) "1; mode=block"))))
182+
:body "foo"}))))
183+
184+
(testing "XSS protection enabled"
185+
(let [handler (-> (constantly (response "foo"))
186+
(wrap-defaults
187+
(-> site-defaults
188+
(assoc-in [:security :xss-protection :enable?] true)
189+
(assoc-in [:security :xss-protection :mode] :block))))
190+
resp (handler (request :get "/"))]
191+
(is (not (nil? (get-in resp [:headers "X-XSS-Protection"]))))
192+
(is (= (get-in resp [:headers "X-XSS-Protection"]) "1; mode=block")))))

0 commit comments

Comments
 (0)