MCPcopy
hub / github.com/expr-lang/expr / HTTPBodyContainsf

Function HTTPBodyContainsf

internal/testify/require/require.go:679–687  ·  view source on GitHub ↗

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

677//
678// Returns whether the assertion was successful (true) or not (false).
679func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
680 if h, ok := t.(tHelper); ok {
681 h.Helper()
682 }
683 if assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) {
684 return
685 }
686 t.FailNow()
687}
688
689// HTTPBodyNotContains asserts that a specified handler returns a
690// body that does not contain a string.

Callers 1

HTTPBodyContainsfMethod · 0.70

Calls 3

HTTPBodyContainsfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…