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

Function HTTPRedirectf

internal/testify/require/require.go:771–779  ·  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

769//
770// Returns whether the assertion was successful (true) or not (false).
771func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
772 if h, ok := t.(tHelper); ok {
773 h.Helper()
774 }
775 if assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) {
776 return
777 }
778 t.FailNow()
779}
780
781// HTTPStatusCode asserts that a specified handler returns a specified status code.
782//

Callers 1

HTTPRedirectfMethod · 0.70

Calls 3

HTTPRedirectfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…