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

Function HTTPBodyNotContains

require/require.go:694–702  ·  view source on GitHub ↗

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

692//
693// Returns whether the assertion was successful (true) or not (false).
694func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
695 if h, ok := t.(tHelper); ok {
696 h.Helper()
697 }
698 if assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) {
699 return
700 }
701 t.FailNow()
702}
703
704// HTTPBodyNotContainsf asserts that a specified handler returns a
705// 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