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

Method HTTPBodyContainsf

assert/assertion_forward.go:556–561  ·  assert/assertion_forward.go::Assertions.HTTPBodyContainsf

HTTPBodyContainsf asserts that a specified handler returns a body that contains a string. a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") Returns whether the assertion was successful (true) or not (false).

(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

554//
555// Returns whether the assertion was successful (true) or not (false).
556func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool {
557 if h, ok := a.t.(tHelper); ok {
558 h.Helper()
559 }
560 return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)
561}
562
563// HTTPBodyNotContains asserts that a specified handler returns a
564// body that does not contain a string.

Callers

nothing calls this directly

Calls 2

HTTPBodyContainsfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected