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{})
| 593 | // |
| 594 | // Returns whether the assertion was successful (true) or not (false). |
| 595 | func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { |
| 596 | if h, ok := a.t.(tHelper); ok { |
| 597 | h.Helper() |
| 598 | } |
| 599 | HTTPError(a.t, handler, method, url, values, msgAndArgs...) |
| 600 | } |
| 601 | |
| 602 | // HTTPErrorf asserts that a specified handler returns an error status code. |
| 603 | // |