HTTPStatusCodef asserts that a specified handler returns a specified status code. assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") Returns whether the assertion was successful (true) or not (false).
(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{})
| 327 | // |
| 328 | // Returns whether the assertion was successful (true) or not (false). |
| 329 | func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { |
| 330 | if h, ok := t.(tHelper); ok { |
| 331 | h.Helper() |
| 332 | } |
| 333 | return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...) |
| 334 | } |
| 335 | |
| 336 | // HTTPSuccessf asserts that a specified handler returns a success status code. |
| 337 | // |
no test coverage detected