MCPcopy
hub / github.com/expr-lang/expr / HTTPSuccess

Function HTTPSuccess

internal/testify/require/require.go:816–824  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

814//
815// Returns whether the assertion was successful (true) or not (false).
816func 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//

Callers 1

HTTPSuccessMethod · 0.70

Calls 3

HTTPSuccessFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…