HTTPSuccessf asserts that a specified handler returns a success status code. require.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "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, msg string, args ...interface{})
| 842 | // |
| 843 | // Returns whether the assertion was successful (true) or not (false). |
| 844 | func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { |
| 845 | if h, ok := t.(tHelper); ok { |
| 846 | h.Helper() |
| 847 | } |
| 848 | if assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) { |
| 849 | return |
| 850 | } |
| 851 | t.FailNow() |
| 852 | } |
| 853 | |
| 854 | // Implements asserts that an object is implemented by the specified interface. |
| 855 | // |
no test coverage detected