mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Fix deferring body close in middleware/compress test (#1063)
This commit is contained in:
parent
181e11a330
commit
7eec915044
@ -35,8 +35,8 @@ func TestGzip(t *testing.T) {
|
||||
assert.Equal(t, gzipScheme, rec.Header().Get(echo.HeaderContentEncoding))
|
||||
assert.Contains(t, rec.Header().Get(echo.HeaderContentType), echo.MIMETextPlain)
|
||||
r, err := gzip.NewReader(rec.Body)
|
||||
defer r.Close()
|
||||
if assert.NoError(t, err) {
|
||||
defer r.Close()
|
||||
buf := new(bytes.Buffer)
|
||||
buf.ReadFrom(r)
|
||||
assert.Equal(t, "test", buf.String())
|
||||
|
Loading…
Reference in New Issue
Block a user