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

Function HTTPBodyNotContains

require/require.go:708–716  ·  require/require.go::HTTPBodyNotContains

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

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

Source from the content-addressed store, hash-verified

706//
707// Returns whether the assertion was successful (true) or not (false).
708func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
709 if h, ok := t.(tHelper); ok {
710 h.Helper()
711 }
712 if assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) {
713 return
714 }
715 t.FailNow()
716}
717
718// HTTPBodyNotContainsf asserts that a specified handler returns a
719// body that does not contain a string.

Callers 1

HTTPBodyNotContainsMethod · 0.70

Calls 3

HTTPBodyNotContainsFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected