Skip to content

Commit

Permalink
fix test on go 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyahui committed Dec 29, 2023
1 parent feb4bdc commit 45e29b1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,14 @@ func TestHeader(t *testing.T) {

{
engine.ServeHTTP(testWriter, testRequest)
values := testWriter.Header().Values("test_header_key")
assert.Equal(t, 1, len(values))
assert.Equal(t, "test_header_value2", values[0])

value := testWriter.Header().Values("test_header_key")

Check failure on line 133 in cache_test.go

View workflow job for this annotation

GitHub Actions / build

testWriter.Header().Values undefined (type http.Header has no field or method Values)
assert.Equal(t, "test_header_value2", value)
}

{
engine.ServeHTTP(testWriter, testRequest)
values := testWriter.Header().Values("test_header_key")
assert.Equal(t, 1, len(values))
assert.Equal(t, "test_header_value2", values[0])
value := testWriter.Header().Get("test_header_key")
assert.Equal(t, "test_header_value2", value)
}
}

Expand Down

0 comments on commit 45e29b1

Please sign in to comment.