From 7d46d3e81bab6cf18f34da5c31966bacf13b2f2f Mon Sep 17 00:00:00 2001 From: Kharec Date: Sat, 29 Nov 2025 15:19:28 +0100 Subject: [PATCH] clean: remove the unused expectedValue in assertHeader (always set to "") --- internal/integration/helpers.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/integration/helpers.go b/internal/integration/helpers.go index 967836f..7a44c88 100644 --- a/internal/integration/helpers.go +++ b/internal/integration/helpers.go @@ -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() actualValue := recorder.Header().Get(name) - if expectedValue == "" { - if actualValue == "" { - t.Errorf("Expected header %s to be present", name) - } - } else if actualValue != expectedValue { - t.Errorf("Expected header %s=%s, got %s", name, expectedValue, actualValue) + if actualValue == "" { + t.Errorf("Expected header %s to be present", name) } }