HTTPSuccess asserts that a specified handler returns a success status code. assert.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{})
| 814 | // |
| 815 | // Returns whether the assertion was successful (true) or not (false). |
| 816 | func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { |
| 817 | if h, ok := t.(tHelper); ok { |
| 818 | h.Helper() |
| 819 | } |
| 820 | if assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) { |
| 821 | return |
| 822 | } |
| 823 | t.FailNow() |
| 824 | } |
| 825 | |
| 826 | // HTTPSuccessf asserts that a specified handler returns a success status code. |
| 827 | // |
no test coverage detected
searching dependent graphs…