(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestRESTWithNextNoContent(t *testing.T) { |
| 221 | reg := &httpmock.Registry{} |
| 222 | defer reg.Verify(t) |
| 223 | client := newTestClient(reg) |
| 224 | |
| 225 | reg.Register( |
| 226 | httpmock.REST(http.MethodDelete, "repos/owner/repo/items/1"), |
| 227 | httpmock.StatusStringResponse(http.StatusNoContent, "not JSON"), |
| 228 | ) |
| 229 | |
| 230 | next, err := client.RESTWithNext("github.com", http.MethodDelete, "repos/owner/repo/items/1", nil, nil) |
| 231 | |
| 232 | require.NoError(t, err) |
| 233 | assert.Empty(t, next) |
| 234 | } |
| 235 | |
| 236 | func TestHandleHTTPError_GraphQL502(t *testing.T) { |
| 237 | req, err := http.NewRequest("GET", "https://api.github.com/user", nil) |
nothing calls this directly
no test coverage detected