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

Method HTTPStatusCodef

internal/testify/assert/assertion_forward.go:640–645  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

638//
639// Returns whether the assertion was successful (true) or not (false).
640func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {
641 if h, ok := a.t.(tHelper); ok {
642 h.Helper()
643 }
644 return HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)
645}
646
647// HTTPSuccess asserts that a specified handler returns a success status code.
648//

Callers

nothing calls this directly

Calls 2

HTTPStatusCodefFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected