HTTPRedirectf asserts that a specified handler returns a redirect status code. require.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{})
| 782 | // |
| 783 | // Returns whether the assertion was successful (true) or not (false). |
| 784 | func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { |
| 785 | if h, ok := t.(tHelper); ok { |
| 786 | h.Helper() |
| 787 | } |
| 788 | if assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) { |
| 789 | return |
| 790 | } |
| 791 | t.FailNow() |
| 792 | } |
| 793 | |
| 794 | // HTTPStatusCode asserts that a specified handler returns a specified status code. |
| 795 | // |
no test coverage detected