clean: remove the unused expectedValue in assertHeader (always set to "")

This commit is contained in:
2025-11-29 15:19:28 +01:00
parent 216aaf3117
commit 7d46d3e81b

View File

@@ -377,15 +377,11 @@ func assertCookieCleared(t *testing.T, recorder *httptest.ResponseRecorder, name
} }
} }
func assertHeader(t *testing.T, recorder *httptest.ResponseRecorder, name, expectedValue string) { func assertHeader(t *testing.T, recorder *httptest.ResponseRecorder, name string) {
t.Helper() t.Helper()
actualValue := recorder.Header().Get(name) actualValue := recorder.Header().Get(name)
if expectedValue == "" { if actualValue == "" {
if actualValue == "" { t.Errorf("Expected header %s to be present", name)
t.Errorf("Expected header %s to be present", name)
}
} else if actualValue != expectedValue {
t.Errorf("Expected header %s=%s, got %s", name, expectedValue, actualValue)
} }
} }