File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ func (t *TestSuite) AssertEqual(expected, actual interface{}) {
221
221
}
222
222
}
223
223
224
+ func (t * TestSuite ) AssertNotEqual (expected , actual interface {}) {
225
+ if Equal (expected , actual ) {
226
+ panic (fmt .Errorf ("(expected) %v == %v (actual)" , expected , actual ))
227
+ }
228
+ }
229
+
224
230
func (t * TestSuite ) Assert (exp bool ) {
225
231
t .Assertf (exp , "Assertion failed" )
226
232
}
@@ -238,6 +244,13 @@ func (t *TestSuite) AssertContains(s string) {
238
244
}
239
245
}
240
246
247
+ // Assert that the response does not contain the given string.
248
+ func (t * TestSuite ) AssertNotContains (s string ) {
249
+ if bytes .Contains (t .ResponseBody , []byte (s )) {
250
+ panic (fmt .Errorf ("Assertion failed. Expected response not to contain %s" , s ))
251
+ }
252
+ }
253
+
241
254
// Assert that the response matches the given regular expression.BUG
242
255
func (t * TestSuite ) AssertContainsRegex (regex string ) {
243
256
r := regexp .MustCompile (regex )
You can’t perform that action at this time.
0 commit comments