mirror of https://github.com/gin-gonic/gin.git
fix(engine): fix unit test (#3878)
* fix(engine): fix unit test * fix(engine): fix unit test
This commit is contained in:
parent
ab8042e9e5
commit
f70dd00b00
|
@ -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"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue