MCPcopy Create free account
hub / github.com/stretchr/testify / HTTPBodyNotContainsf

Function HTTPBodyNotContainsf

require/require.go:710–718  ·  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

708//
709// Returns whether the assertion was successful (true) or not (false).
710func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
711 if h, ok := t.(tHelper); ok {
712 h.Helper()
713 }
714 if assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) {
715 return
716 }
717 t.FailNow()
718}
719
720// HTTPError asserts that a specified handler returns an error status code.
721//

Callers 1

HTTPBodyNotContainsfMethod · 0.70

Calls 3

HTTPBodyNotContainsfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected