Skip to content

Commit

Permalink
docs: fix ContainSubstring references (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
williandandrade authored Jun 16, 2023
1 parent 9076019 commit fc9a89f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ Here are some examples:
- `Expect(resp).To(HaveHTTPHeaderWithValue("Content-Type", "application/json"))`:
asserts that the `Content-Type` header has exactly the value `application/json`.

- `Expect(resp).To(HaveHTTPHeaderWithValue(ContainsSubstring("json")))`:
- `Expect(resp).To(HaveHTTPHeaderWithValue(ContainSubstring("json")))`:
asserts that the `Content-Type` header contains the substring `json`.

### Asserting on Panics
Expand Down
6 changes: 3 additions & 3 deletions matchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func Succeed() types.GomegaMatcher {
//
// These are valid use-cases:
//
// Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error"
// Expect(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual)
// Expect(err).Should(MatchError(ContainsSubstring("sprocket not found"))) // asserts that edrr.Error() contains substring "sprocket not found"
// Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error"
// Expect(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual)
// Expect(err).Should(MatchError(ContainSubstring("sprocket not found"))) // asserts that edrr.Error() contains substring "sprocket not found"
//
// It is an error for err to be nil or an object that does not implement the
// Error interface
Expand Down

0 comments on commit fc9a89f

Please sign in to comment.