clean: remove the unused expectedValue in assertHeader (always set to "")
This commit is contained in:
@@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user