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

Function HTTPRedirect

internal/testify/require/require.go:756–764  ·  view source on GitHub ↗

HTTPRedirect asserts that a specified handler returns a redirect status code. assert.HTTPRedirect(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, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

754//
755// Returns whether the assertion was successful (true) or not (false).
756func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
757 if h, ok := t.(tHelper); ok {
758 h.Helper()
759 }
760 if assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) {
761 return
762 }
763 t.FailNow()
764}
765
766// HTTPRedirectf asserts that a specified handler returns a redirect status code.
767//

Callers 1

HTTPRedirectMethod · 0.70

Calls 3

HTTPRedirectFunction · 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…