MCPcopy Create free account
hub / github.com/aeilang/httpz / TestNewHTTPError

Function TestNewHTTPError

error_test.go:12–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestNewHTTPError(t *testing.T) {
13 err := NewHTTPError(http.StatusBadRequest, "bad request")
14 assert.Equal(t, http.StatusBadRequest, err.StatusCode)
15 assert.Equal(t, "bad request", err.Msg)
16 assert.Nil(t, err.Internal)
17}
18
19func TestHTTPError_SetInternal(t *testing.T) {
20 internalErr := errors.New("internal error")

Callers

nothing calls this directly

Calls 1

NewHTTPErrorFunction · 0.85

Tested by

no test coverage detected