MCPcopy Create free account
hub / github.com/gotenberg/gotenberg / TestSentinelHttpError_HttpError

Function TestSentinelHttpError_HttpError

pkg/modules/api/errors_test.go:35–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestSentinelHttpError_HttpError(t *testing.T) {
36 actualStatus, actualMessage := SentinelHttpError{
37 status: http.StatusInternalServerError,
38 message: "foo",
39 }.HttpError()
40
41 expectStatus := http.StatusInternalServerError
42 expectMessage := "foo"
43
44 if actualStatus != expectStatus {
45 t.Errorf("expected %d but got %d", expectStatus, actualStatus)
46 }
47
48 if actualMessage != expectMessage {
49 t.Errorf("expected '%s' but got '%s'", expectMessage, actualMessage)
50 }
51}
52
53func TestSentinelWrappedError_Is(t *testing.T) {
54 errSentinel := SentinelHttpError{}

Callers

nothing calls this directly

Calls 1

HttpErrorMethod · 0.65

Tested by

no test coverage detected