1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

Fixed test for content disposition

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-08-24 08:57:36 -07:00
parent 4df355113b
commit cec7629194

View File

@ -187,7 +187,7 @@ func TestContext(t *testing.T) {
err = c.Attachment("_fixture/images/walle.png", "walle.png")
if assert.NoError(t, err) {
assert.Equal(t, http.StatusOK, rec.Code)
assert.Equal(t, "attachment; filename=walle.png", rec.Header().Get(HeaderContentDisposition))
assert.Equal(t, "attachment; filename=\"walle.png\"", rec.Header().Get(HeaderContentDisposition))
assert.Equal(t, 219885, rec.Body.Len())
}
@ -197,7 +197,7 @@ func TestContext(t *testing.T) {
err = c.Inline("_fixture/images/walle.png", "walle.png")
if assert.NoError(t, err) {
assert.Equal(t, http.StatusOK, rec.Code)
assert.Equal(t, "inline; filename=walle.png", rec.Header().Get(HeaderContentDisposition))
assert.Equal(t, "inline; filename=\"walle.png\"", rec.Header().Get(HeaderContentDisposition))
assert.Equal(t, 219885, rec.Body.Len())
}