MCPcopy
hub / github.com/stretchr/testify / HTTPSuccessf

Function HTTPSuccessf

assert/assertion_format.go:341–346  ·  assert/assertion_format.go::HTTPSuccessf

HTTPSuccessf asserts that a specified handler returns a success status code. assert.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{})

Source from the content-addressed store, hash-verified

339//
340// Returns whether the assertion was successful (true) or not (false).
341func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool {
342 if h, ok := t.(tHelper); ok {
343 h.Helper()
344 }
345 return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...)
346}
347
348// Implementsf asserts that an object is implemented by the specified interface.
349//

Callers 2

HTTPSuccessfFunction · 0.92
HTTPSuccessfMethod · 0.70

Calls 2

HTTPSuccessFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected