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

Method HTTPSuccess

internal/testify/assert/assertion_forward.go:652–657  ·  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

650//
651// Returns whether the assertion was successful (true) or not (false).
652func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
653 if h, ok := a.t.(tHelper); ok {
654 h.Helper()
655 }
656 return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)
657}
658
659// HTTPSuccessf asserts that a specified handler returns a success status code.
660//

Callers 1

TestHTTPStatusesWrapperFunction · 0.45

Calls 2

HTTPSuccessFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestHTTPStatusesWrapperFunction · 0.36