(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestPublishReleaseHTTPError(t *testing.T) { |
| 85 | reg := &httpmock.Registry{} |
| 86 | defer reg.Verify(t) |
| 87 | reg.Register( |
| 88 | httpmock.REST("PATCH", "releases/123"), |
| 89 | httpmock.StatusStringResponse(http.StatusInternalServerError, `{"message":"Internal Server Error"}`), |
| 90 | ) |
| 91 | |
| 92 | _, err := publishRelease(&http.Client{Transport: reg}, "github.com", safeurl.NewImmutableSafeURL("https://api.github.com/releases/123"), "", nil) |
| 93 | |
| 94 | requireAPIHTTPError(t, err, http.StatusInternalServerError) |
| 95 | } |
| 96 | |
| 97 | func TestDeleteReleaseHTTPError(t *testing.T) { |
| 98 | reg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected