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:
Graham McIntire 2026-02-01 11:08:12 -06:00
parent c4e8c70e7d
commit d9876d8217
No known key found for this signature in database

View file

@ -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