Skip to content

Commit

Permalink
fix(engine): fix unit test (#3878)
Browse files Browse the repository at this point in the history
* fix(engine): fix unit test

* fix(engine): fix unit test
  • Loading branch information
flc1125 authored Mar 12, 2024
1 parent ab8042e commit f70dd00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}

Expand Down

0 comments on commit f70dd00

Please sign in to comment.