Skip to content

Commit

Permalink
Fix ExpectBodyContains
Browse files Browse the repository at this point in the history
  • Loading branch information
celrenheit committed Nov 12, 2016
1 parent 356d2d8 commit 6d71ed1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion response_asserter.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (ra *responseAsserter) ExpectBodyBytes(expected []byte) ResponseAsserter {

func (ra *responseAsserter) ExpectBodyContains(expected string) ResponseAsserter {
actual := ra.w.Body.String()
if strings.Contains(actual, expected) {
if !strings.Contains(actual, expected) {
ra.Error("body", "contain", expected, actual)
}
return ra
Expand Down

0 comments on commit 6d71ed1

Please sign in to comment.