MCPcopy
hub / github.com/stretchr/testify / HTTPRedirectf

Method HTTPRedirectf

assert/assertion_forward.go:630–635  ·  view source on GitHub ↗

HTTPRedirectf asserts that a specified handler returns a redirect status code. a.HTTPRedirectf(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, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

HTTPRedirectfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected