HTTPError asserts that a specified handler returns an error status code. a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} Returns whether the assertion was successful (true) or not (false).
(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
| 580 | // |
| 581 | // Returns whether the assertion was successful (true) or not (false). |
| 582 | func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { |
| 583 | if h, ok := a.t.(tHelper); ok { |
| 584 | h.Helper() |
| 585 | } |
| 586 | HTTPError(a.t, handler, method, url, values, msgAndArgs...) |
| 587 | } |
| 588 | |
| 589 | // HTTPErrorf asserts that a specified handler returns an error status code. |
| 590 | // |