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

Method HTTPError

internal/testify/require/require_forward.go:582–587  ·  view source on GitHub ↗

HTTPError asserts that a specified handler returns an error status code. a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} 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

580//
581// Returns whether the assertion was successful (true) or not (false).
582func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
583 if h, ok := a.t.(tHelper); ok {
584 h.Helper()
585 }
586 HTTPError(a.t, handler, method, url, values, msgAndArgs...)
587}
588
589// HTTPErrorf asserts that a specified handler returns an error status code.
590//

Callers

nothing calls this directly

Calls 2

HTTPErrorFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected