From 75a02863236f5b14370e90b67c8a5b4063736a20 Mon Sep 17 00:00:00 2001 From: Eitaro Fukamachi Date: Sat, 21 Mar 2015 01:41:40 +0900 Subject: [PATCH] Fix tests of lack-middleware-csrf. --- t/middleware/csrf.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/middleware/csrf.lisp b/t/middleware/csrf.lisp index c162b27..af9eee3 100644 --- a/t/middleware/csrf.lisp +++ b/t/middleware/csrf.lisp @@ -58,7 +58,7 @@ (dex:get "http://localhost:4242/" :cookie-jar cookie-jar) (is status 200 "Status is 200") - (is (gethash "content-type" headers) "text/html" "Content-Type is text/html") + (is (gethash "content-type" headers) "text/html; charset=utf-8" "Content-Type is text/html") (setf csrf-token (parse-csrf-token body)) (ok csrf-token "can get CSRF token") (is-type csrf-token 'string "CSRF token is string") @@ -68,7 +68,7 @@ (dex:post "http://localhost:4242/" :cookie-jar cookie-jar) (is status 400 "Status is 400") - (is (gethash "content-type" headers) "text/plain" "Content-Type is text/plain") + (is (gethash "content-type" headers) "text/plain; charset=utf-8" "Content-Type is text/plain") (is body "Bad Request: invalid CSRF token" "Body is 'forbidden'")) (diag "bad POST request (wrong token)") (is (nth-value @@ -85,7 +85,7 @@ ("_csrf_token" . ,csrf-token)) :cookie-jar cookie-jar) (is status 200 "Status is 200") - (is (gethash "content-type" headers) "text/html" "Content-Type is text/html") + (is (gethash "content-type" headers) "text/html; charset=utf-8" "Content-Type is text/html") (is body "Eitaro Fukamachi" "can read body-parameter")))) (subtest-app "enable one-time token" @@ -118,6 +118,6 @@ :cookie-jar cookie-jar) (declare (ignore body)) (is status 400 "Status is 400") - (is (gethash "content-type" headers) "text/plain" "Content-Type is text/plain")))) + (is (gethash "content-type" headers) "text/plain; charset=utf-8" "Content-Type is text/plain")))) (finalize)