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

Method HTTPStatusCode

internal/testify/assert/assertion_forward.go:628–633  ·  view source on GitHub ↗

HTTPStatusCode asserts that a specified handler returns a specified status code. a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) Returns whether the assertion was successful (true) or not (false).

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

Source from the content-addressed store, hash-verified

626//
627// Returns whether the assertion was successful (true) or not (false).
628func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool {
629 if h, ok := a.t.(tHelper); ok {
630 h.Helper()
631 }
632 return HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)
633}
634
635// HTTPStatusCodef asserts that a specified handler returns a specified status code.
636//

Callers

nothing calls this directly

Calls 2

HTTPStatusCodeFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected