HTTPSuccess asserts that a specified handler returns a success status code. require.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) Returns whether the assertion was successful (true) or not (false).
(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{})
| 827 | // |
| 828 | // Returns whether the assertion was successful (true) or not (false). |
| 829 | func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { |
| 830 | if h, ok := t.(tHelper); ok { |
| 831 | h.Helper() |
| 832 | } |
| 833 | if assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) { |
| 834 | return |
| 835 | } |
| 836 | t.FailNow() |
| 837 | } |
| 838 | |
| 839 | // HTTPSuccessf asserts that a specified handler returns a success status code. |
| 840 | // |
no test coverage detected