Remove misleading duplicate header test from CaptureTimezone
The test incorrectly suggested the plug handles duplicate headers, but put_req_header replaces values. Cloudflare only sends one cf-timezone header, making this test unnecessary.
This commit is contained in:
parent
c4e8c70e7d
commit
d9876d8217
1 changed files with 0 additions and 12 deletions
|
|
@ -32,17 +32,5 @@ defmodule ToweropsWeb.Plugs.CaptureTimezoneTest do
|
|||
|
||||
assert get_session(conn, :detected_timezone) == "UTC"
|
||||
end
|
||||
|
||||
test "handles overridden timezone headers by taking last", %{conn: conn} do
|
||||
# put_req_header replaces the header value, so the last one wins
|
||||
conn =
|
||||
conn
|
||||
|> init_test_session(%{})
|
||||
|> put_req_header("cf-timezone", "America/Chicago")
|
||||
|> put_req_header("cf-timezone", "Europe/London")
|
||||
|> CaptureTimezone.call([])
|
||||
|
||||
assert get_session(conn, :detected_timezone) == "Europe/London"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue