mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 05:42:09 +08:00
Use Header()
instead of deprecated HeaderMap
`HeaderMap` is deprecated and should avoid to use. Ref: https://golang.org/pkg/net/http/httptest/#ResponseRecorder
This commit is contained in:
parent
ee4de846a8
commit
2bb70315d3
@ -1044,7 +1044,7 @@ func TestContextRenderAttachment(t *testing.T) {
|
||||
|
||||
assert.Equal(t, 200, w.Code)
|
||||
assert.Contains(t, w.Body.String(), "func New() *Engine {")
|
||||
assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.HeaderMap.Get("Content-Disposition"))
|
||||
assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.Header().Get("Content-Disposition"))
|
||||
}
|
||||
|
||||
// TestContextRenderYAML tests that the response is serialized as YAML
|
||||
|
Loading…
x
Reference in New Issue
Block a user