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:
parent
31e795315a
commit
90822319eb
@ -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)
|
||||
},
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user