1
测试代码: PRN响应时无效防伪错误
(testing "adding a record"
(let [response (app (mock/request :post "/api/df"
"{\"id\":123}"))]
(prn response)
(is (= (:status response) 200))))
测试错误:
{:status 403, :headers {"Content-Type" "text/html; charset=utf-8", "X-XSS-Protection" "1; mode=block", "X-Frame-Options" "SAMEORIGIN", "X-Content-Type-Options" "nosniff"}, :body "<h1>Invalid anti-forgery token</h1>"}
而你的问题是......? –
你如何编写测试来测试它? –