1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Fixed test

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2018-08-28 20:49:22 -07:00
parent 31e795315a
commit 90822319eb

View File

@ -60,12 +60,7 @@ func TestBodyDumpFails(t *testing.T) {
return errors.New("some error")
}
requestBody := ""
responseBody := ""
mw := BodyDump(func(c echo.Context, reqBody, resBody []byte) {
requestBody = string(reqBody)
responseBody = string(resBody)
})
mw := BodyDump(func(c echo.Context, reqBody, resBody []byte) {})
if !assert.Error(t, mw(h)(c)) {
t.FailNow()
@ -84,8 +79,6 @@ func TestBodyDumpFails(t *testing.T) {
return true
},
Handler: func(c echo.Context, reqBody, resBody []byte) {
requestBody = string(reqBody)
responseBody = string(resBody)
},
})