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