MCPcopy Create free account
hub / github.com/cli/cli / TestGenerateReleaseNotesNotImplemented

Function TestGenerateReleaseNotesNotImplemented

pkg/cmd/release/create/http_test.go:29–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestGenerateReleaseNotesNotImplemented(t *testing.T) {
30 reg := &httpmock.Registry{}
31 defer reg.Verify(t)
32 reg.Register(
33 httpmock.REST("POST", "repos/OWNER/REPO/releases/generate-notes"),
34 httpmock.StatusStringResponse(http.StatusNotFound, `{"message":"Not Found"}`),
35 )
36
37 _, err := generateReleaseNotes(&http.Client{Transport: reg}, ghrepo.New("OWNER", "REPO"), "v1.2.3", "", "")
38
39 assert.Same(t, notImplementedError, err)
40}
41
42func TestGenerateReleaseNotesHTTPError(t *testing.T) {
43 reg := &httpmock.Registry{}

Callers

nothing calls this directly

Calls 6

VerifyMethod · 0.95
RegisterMethod · 0.95
RESTFunction · 0.92
StatusStringResponseFunction · 0.92
NewFunction · 0.92
generateReleaseNotesFunction · 0.85

Tested by

no test coverage detected