fix(engine): fix unit test (#3878)

* fix(engine): fix unit test

* fix(engine): fix unit test
This commit is contained in:
Flc゛ 2024-03-12 13:49:23 +08:00 committed by GitHub
parent ab8042e9e5
commit f70dd00b00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1044,7 +1044,7 @@ func TestContextRenderAndEscapeAttachment(t *testing.T) {
c.FileAttachment("./gin.go", maliciousFilename)
assert.Equal(t, 200, w.Code)
assert.Contains(t, w.Body.String(), "func New() *Engine {")
assert.Contains(t, w.Body.String(), "func New(opts ...OptionFunc) *Engine {")
assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", actualEscapedResponseFilename), w.Header().Get("Content-Disposition"))
}