Skip to content

Commit

Permalink
Optimize web body match output
Browse files Browse the repository at this point in the history
  • Loading branch information
themue committed Nov 14, 2021
1 parent 32c05d9 commit c7c876c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.5.2

* (C) Optimize output of last change

## v0.5.1

* (C) Fix output in case of failing web body assertions

## v0.5.0

* (A) Asserts now contains NotOK() and AnyError()
Expand Down
2 changes: 1 addition & 1 deletion environments/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (wresp *WebResponse) AssertBodyMatches(pattern string) {
body := string(wresp.body)
ok, err := regexp.MatchString(pattern, body)
wresp.wa.assert.Nil(err, "illegal content match pattern")
wresp.wa.assert.True(ok, "body doesn't match pattern", body)
wresp.wa.assert.True(ok, "body doesn't match pattern", "["+body+"]")
}

// AssertBodyGrep greps content out of the body.
Expand Down

0 comments on commit c7c876c

Please sign in to comment.