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")
|
||||
}
|
||||
|
||||
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)
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user