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

Method HTTPSuccess

assert/assertion_forward.go:666–671  ·  view source on GitHub ↗

HTTPSuccess asserts that a specified handler returns a success status code. a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) Returns whether the assertion was successful (true) or not (false).

(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

664//
665// Returns whether the assertion was successful (true) or not (false).
666func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
667 if h, ok := a.t.(tHelper); ok {
668 h.Helper()
669 }
670 return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)
671}
672
673// HTTPSuccessf asserts that a specified handler returns a success status code.
674//

Callers 1

TestHTTPStatusesWrapperFunction · 0.45

Calls 2

HTTPSuccessFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestHTTPStatusesWrapperFunction · 0.36