MCPcopy Index your code
hub / github.com/imroc/req / assertIsError

Function assertIsError

req_test.go:367–374  ·  view source on GitHub ↗
(t *testing.T, resp *Response, err error)

Source from the content-addressed store, hash-verified

365}
366
367func assertIsError(t *testing.T, resp *Response, err error) {
368 tests.AssertNoError(t, err)
369 tests.AssertNotNil(t, resp)
370 tests.AssertNotNil(t, resp.Body)
371 if !resp.IsErrorState() {
372 t.Error("Response.IsErrorState should return true")
373 }
374}
375
376func TestTrailer(t *testing.T) {
377 resp, err := tc().EnableForceHTTP1().R().Get("/chunked")

Callers 1

testErrorFunction · 0.85

Calls 4

AssertNoErrorFunction · 0.92
AssertNotNilFunction · 0.92
IsErrorStateMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…