mirror of
https://github.com/labstack/echo.git
synced 2025-11-23 22:24:54 +02:00
@@ -60,12 +60,7 @@ func TestBodyDumpFails(t *testing.T) {
|
|||||||
return errors.New("some error")
|
return errors.New("some error")
|
||||||
}
|
}
|
||||||
|
|
||||||
requestBody := ""
|
mw := BodyDump(func(c echo.Context, reqBody, resBody []byte) {})
|
||||||
responseBody := ""
|
|
||||||
mw := BodyDump(func(c echo.Context, reqBody, resBody []byte) {
|
|
||||||
requestBody = string(reqBody)
|
|
||||||
responseBody = string(resBody)
|
|
||||||
})
|
|
||||||
|
|
||||||
if !assert.Error(t, mw(h)(c)) {
|
if !assert.Error(t, mw(h)(c)) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
@@ -84,8 +79,6 @@ func TestBodyDumpFails(t *testing.T) {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
Handler: func(c echo.Context, reqBody, resBody []byte) {
|
Handler: func(c echo.Context, reqBody, resBody []byte) {
|
||||||
requestBody = string(reqBody)
|
|
||||||
responseBody = string(resBody)
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user