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

Function HTTPBodyContainsf

assert/assertion_format.go:280–285  ·  assert/assertion_format.go::HTTPBodyContainsf

HTTPBodyContainsf asserts that a specified handler returns a body that contains a string. assert.HTTPBodyContainsf(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

278//
279// Returns whether the assertion was successful (true) or not (false).
280func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
281 if h, ok := t.(tHelper); ok {
282 h.Helper()
283 }
284 return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...)
285}
286
287// HTTPBodyNotContainsf asserts that a specified handler returns a
288// body that does not contain a string.

Callers 2

HTTPBodyContainsfFunction · 0.92
HTTPBodyContainsfMethod · 0.70

Calls 2

HTTPBodyContainsFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected