MCPcopy Index your code
hub / github.com/gotify/server / TestErrorHandling

Function TestErrorHandling

api/errorHandling_test.go:11–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestErrorHandling(t *testing.T) {
12 rec := httptest.NewRecorder()
13
14 ctx, _ := gin.CreateTestContext(rec)
15 successOrAbort(ctx, 500, errors.New("err"))
16
17 if rec.Code != 500 {
18 t.Fail()
19 }
20}

Callers

nothing calls this directly

Calls 1

successOrAbortFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…