Skip to content
Snippets Groups Projects
Unverified Commit ad4ded48 authored by Bryan Maass's avatar Bryan Maass Committed by GitHub
Browse files

add standard cookie policy to test http client (#20019)

- no longer prints log about invalid expires cookie in tests
parent ea5aacdc
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@
(if (map? credentials)
(authenticate credentials)
credentials))}
:cookie-policy :standard
:content-type :json}
(when (seq http-body)
{:body (json/generate-string http-body)})))
......
......@@ -27,7 +27,7 @@
(deftest no-existing-cookie
(testing "set DEVICE cookie with SameSite=Lax if served over HTTP"
(let [request (-> (mock/request :get "http://localhost/foo"))
(let [request (mock/request :get "http://localhost/foo")
response (handler request)
browser-id (:body response)]
(is (some? (UUID/fromString browser-id)))
......@@ -38,7 +38,7 @@
(-> (get-in response [:cookies browser-id-cookie-name])
(dissoc :expires))))))
(testing "set DEVICE cookie with SameSite=None if served over HTTPS"
(let [request (-> (mock/request :get "https://localhost/foo"))
(let [request (mock/request :get "https://localhost/foo")
response (handler request)
browser-id (:body response)]
(is (some? (UUID/fromString browser-id)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment