MCPcopy Create free account
hub / github.com/cli/cli / requireAPIHTTPError

Function requireAPIHTTPError

pkg/cmd/release/create/http_test.go:164–171  ·  view source on GitHub ↗
(t *testing.T, err error, statusCode int)

Source from the content-addressed store, hash-verified

162}
163
164func requireAPIHTTPError(t *testing.T, err error, statusCode int) {
165 t.Helper()
166
167 var httpErr api.HTTPError
168 require.ErrorAs(t, err, &httpErr)
169 assert.Equal(t, statusCode, httpErr.StatusCode)
170 assert.Contains(t, err.Error(), fmt.Sprintf("HTTP %d", statusCode))
171}

Calls 4

EqualMethod · 0.80
ContainsMethod · 0.80
HelperMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected