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

Method HTTPRedirectf

require/require_forward.go:631–636  ·  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

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

Callers

nothing calls this directly

Calls 2

HTTPRedirectfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected