MCPcopy
hub / github.com/stretchr/testify / HTTPBodyNotContainsf

Function HTTPBodyNotContainsf

require/require.go:724–732  ·  view source on GitHub ↗

HTTPBodyNotContainsf asserts that a specified handler returns a body that does not contain a string. require.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") Returns whether the assertion was successful (true) or not (false).

(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

722//
723// Returns whether the assertion was successful (true) or not (false).
724func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
725 if h, ok := t.(tHelper); ok {
726 h.Helper()
727 }
728 if assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) {
729 return
730 }
731 t.FailNow()
732}
733
734// HTTPError asserts that a specified handler returns an error status code.
735//

Callers 1

HTTPBodyNotContainsfMethod · 0.70

Calls 3

HTTPBodyNotContainsfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected