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

Method HTTPRedirect

internal/testify/assert/assertion_forward.go:604–609  ·  view source on GitHub ↗

HTTPRedirect asserts that a specified handler returns a redirect status code. a.HTTPRedirect(myHandler, "GET", "/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

602//
603// Returns whether the assertion was successful (true) or not (false).
604func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool {
605 if h, ok := a.t.(tHelper); ok {
606 h.Helper()
607 }
608 return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)
609}
610
611// HTTPRedirectf asserts that a specified handler returns a redirect status code.
612//

Callers 1

TestHTTPStatusesWrapperFunction · 0.45

Calls 2

HTTPRedirectFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestHTTPStatusesWrapperFunction · 0.36