mirror of
https://github.com/labstack/echo.git
synced 2025-12-01 22:51:17 +02:00
@@ -36,12 +36,11 @@ func TestGzip(t *testing.T) {
|
||||
rec := test.NewResponseRecorder()
|
||||
c := echo.NewContext(req, rec, e)
|
||||
// Skip if no Accept-Encoding header
|
||||
h := Gzip()(echo.HandlerFunc(func(c echo.Context) error {
|
||||
h := NewGzip().Handle(echo.HandlerFunc(func(c echo.Context) error {
|
||||
c.Response().Write([]byte("test")) // For Content-Type sniffing
|
||||
return nil
|
||||
}))
|
||||
h.Handle(c)
|
||||
// assert.Equal(t, http.StatusOK, rec.Status())
|
||||
assert.Equal(t, "test", rec.Body.String())
|
||||
|
||||
req = test.NewRequest(echo.GET, "/", nil)
|
||||
|
||||
Reference in New Issue
Block a user