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

Function HTTPStatusCodef

internal/testify/assert/assertion_format.go:322–327  ·  view source on GitHub ↗

HTTPStatusCodef asserts that a specified handler returns a specified status code. assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "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, statuscode int, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

320//
321// Returns whether the assertion was successful (true) or not (false).
322func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool {
323 if h, ok := t.(tHelper); ok {
324 h.Helper()
325 }
326 return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...)
327}
328
329// HTTPSuccessf asserts that a specified handler returns a success status code.
330//

Callers 2

HTTPStatusCodefFunction · 0.92
HTTPStatusCodefMethod · 0.70

Calls 2

HTTPStatusCodeFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…