Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Aug 29, 2018
1 parent 31e7953 commit 9082231
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions middleware/body_dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
},
})

Expand Down

0 comments on commit 9082231

Please sign in to comment.