Skip to content

Commit 4dada36

Browse files
committed
fix failing have http tests
1 parent d40c691 commit 4dada36

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

matchers/have_http_body_matcher_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ to equal
136136
})
137137
Expect(failures).To(HaveLen(1))
138138
Expect(failures[0]).To(MatchRegexp(`^Expected
139-
<\[\]uint8 \| len:\d+, cap:\d+>: this is the body
139+
<\[\]uint8 \| len:\d+, cap:\d+>: \"this is the body\"
140140
to equal
141-
<\[\]uint8 ]| len:\d+, cap:\d+>: this is a different body$`))
141+
<\[\]uint8 ]| len:\d+, cap:\d+>: \"this is a different body\"$`))
142142
})
143143
})
144144

@@ -186,9 +186,9 @@ not to equal
186186
})
187187
Expect(failures).To(HaveLen(1))
188188
Expect(failures[0]).To(MatchRegexp(`^Expected
189-
<\[\]uint8 \| len:\d+, cap:\d+>: this is the body
189+
<\[\]uint8 \| len:\d+, cap:\d+>: \"this is the body\"
190190
not to equal
191-
<\[\]uint8 \| len:\d+, cap:\d+>: this is the body$`))
191+
<\[\]uint8 \| len:\d+, cap:\d+>: \"this is the body\"$`))
192192
})
193193
})
194194

matchers/have_http_status_matcher_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ var _ = Describe("HaveHTTPStatus", func() {
128128
Expect(failures).To(HaveLen(1))
129129
Expect(failures[0]).To(Equal(`Expected
130130
<*http.Response>: {
131-
Status: <string>: "502 Bad Gateway"
131+
Status: <string>: 502 Bad Gateway
132132
StatusCode: <int>: 502
133-
Body: <string>: "did not like it"
133+
Body: <string>: did not like it
134134
}
135135
to have HTTP status
136136
<int>: 200`), failures[0])
@@ -148,9 +148,9 @@ to have HTTP status
148148
Expect(failures).To(HaveLen(1))
149149
Expect(failures[0]).To(Equal(`Expected
150150
<*http.Response>: {
151-
Status: <string>: "502 Bad Gateway"
151+
Status: <string>: 502 Bad Gateway
152152
StatusCode: <int>: 502
153-
Body: <string>: "did not like it"
153+
Body: <string>: did not like it
154154
}
155155
to have HTTP status
156156
<int>: 200
@@ -172,9 +172,9 @@ to have HTTP status
172172
Expect(failures).To(HaveLen(1))
173173
Expect(failures[0]).To(Equal(`Expected
174174
<*http.Response>: {
175-
Status: <string>: "200 OK"
175+
Status: <string>: 200 OK
176176
StatusCode: <int>: 200
177-
Body: <string>: "got it!"
177+
Body: <string>: got it!
178178
}
179179
not to have HTTP status
180180
<int>: 200`), failures[0])
@@ -192,9 +192,9 @@ not to have HTTP status
192192
Expect(failures).To(HaveLen(1))
193193
Expect(failures[0]).To(Equal(`Expected
194194
<*http.Response>: {
195-
Status: <string>: "200 OK"
195+
Status: <string>: 200 OK
196196
StatusCode: <int>: 200
197-
Body: <string>: "got it!"
197+
Body: <string>: got it!
198198
}
199199
not to have HTTP status
200200
<int>: 200

0 commit comments

Comments
 (0)