HTTPErrorf asserts that a specified handler returns an error status code. assert.HTTPErrorf(t, myHandler, "POST", "/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{})
| 296 | // |
| 297 | // Returns whether the assertion was successful (true) or not (false). |
| 298 | func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { |
| 299 | if h, ok := t.(tHelper); ok { |
| 300 | h.Helper() |
| 301 | } |
| 302 | return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) |
| 303 | } |
| 304 | |
| 305 | // HTTPRedirectf asserts that a specified handler returns a redirect status code. |
| 306 | // |
no test coverage detected
searching dependent graphs…