Skip to content

Commit fc9a89f

Browse files
authoredJun 16, 2023
docs: fix ContainSubstring references (#673)
1 parent 9076019 commit fc9a89f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ Here are some examples:
15101510
- `Expect(resp).To(HaveHTTPHeaderWithValue("Content-Type", "application/json"))`:
15111511
asserts that the `Content-Type` header has exactly the value `application/json`.
15121512

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

15161516
### Asserting on Panics

‎matchers.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ func Succeed() types.GomegaMatcher {
9292
//
9393
// These are valid use-cases:
9494
//
95-
// Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error"
96-
// Expect(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual)
97-
// Expect(err).Should(MatchError(ContainsSubstring("sprocket not found"))) // asserts that edrr.Error() contains substring "sprocket not found"
95+
// Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error"
96+
// Expect(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual)
97+
// Expect(err).Should(MatchError(ContainSubstring("sprocket not found"))) // asserts that edrr.Error() contains substring "sprocket not found"
9898
//
9999
// It is an error for err to be nil or an object that does not implement the
100100
// Error interface

0 commit comments

Comments
 (0)
Please sign in to comment.