(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…