summaryrefslogtreecommitdiff
path: root/src/couch/test/exunit/same_site_cookie_tests.exs
diff options
context:
space:
mode:
Diffstat (limited to 'src/couch/test/exunit/same_site_cookie_tests.exs')
-rw-r--r--src/couch/test/exunit/same_site_cookie_tests.exs44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/couch/test/exunit/same_site_cookie_tests.exs b/src/couch/test/exunit/same_site_cookie_tests.exs
deleted file mode 100644
index bad32ada4..000000000
--- a/src/couch/test/exunit/same_site_cookie_tests.exs
+++ /dev/null
@@ -1,44 +0,0 @@
-defmodule SameSiteCookieTests do
- use CouchTestCase
-
- @moduletag :authentication
-
- def get_cookie(user, pass) do
- resp = Couch.post("/_session", body: %{:username => user, :password => pass})
-
- true = resp.body["ok"]
- resp.headers[:"set-cookie"]
- end
-
- @tag config: [{"admins", "jan", "apple"}, {"couch_httpd_auth", "same_site", "None"}]
- test "Set same_site None" do
- cookie = get_cookie("jan", "apple")
- assert cookie =~ "; SameSite=None"
- end
-
- @tag config: [{"admins", "jan", "apple"}, {"couch_httpd_auth", "same_site", ""}]
- test "same_site not set" do
- cookie = get_cookie("jan", "apple")
- assert cookie
- refute cookie =~ "; SameSite="
- end
-
- @tag config: [{"admins", "jan", "apple"}, {"couch_httpd_auth", "same_site", "Strict"}]
- test "Set same_site Strict" do
- cookie = get_cookie("jan", "apple")
- assert cookie =~ "; SameSite=Strict"
- end
-
- @tag config: [{"admins", "jan", "apple"}, {"couch_httpd_auth", "same_site", "Lax"}]
- test "Set same_site Lax" do
- cookie = get_cookie("jan", "apple")
- assert cookie =~ "; SameSite=Lax"
- end
-
- @tag config: [{"admins", "jan", "apple"}, {"couch_httpd_auth", "same_site", "Invalid"}]
- test "Set same_site invalid" do
- cookie = get_cookie("jan", "apple")
- assert cookie
- refute cookie =~ "; SameSite="
- end
-end