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{})
| 754 | // |
| 755 | // Returns whether the assertion was successful (true) or not (false). |
| 756 | func 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 | // |
no test coverage detected
searching dependent graphs…