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

Function HTTPRedirectf

assert/assertion_format.go:317–322  ·  view source on GitHub ↗

HTTPRedirectf asserts that a specified handler returns a redirect status code. assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} Returns whether the assertion was successful (true) or not (false).

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

Source from the content-addressed store, hash-verified

315//
316// Returns whether the assertion was successful (true) or not (false).
317func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
318 if h, ok := t.(tHelper); ok {
319 h.Helper()
320 }
321 return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
322}
323
324// HTTPStatusCodef asserts that a specified handler returns a specified status code.
325//

Callers 2

HTTPRedirectfFunction · 0.92
HTTPRedirectfMethod · 0.70

Calls 2

HTTPRedirectFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected