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

Function mockSuccessfulEditResponse

pkg/cmd/release/edit/edit_test.go:477–483  ·  view source on GitHub ↗
(reg *httpmock.Registry, cb func(params map[string]any))

Source from the content-addressed store, hash-verified

475}
476
477func mockSuccessfulEditResponse(reg *httpmock.Registry, cb func(params map[string]any)) {
478 matcher := httpmock.REST("PATCH", "repos/OWNER/REPO/releases/12345")
479 responder := httpmock.RESTPayload(201, `{
480 "html_url": "https://github.com/OWNER/REPO/releases/tag/v1.2.3"
481 }`, cb)
482 reg.Register(matcher, responder)
483}
484
485func Test_editRelease_httpError(t *testing.T) {
486 reg := &httpmock.Registry{}

Callers 1

Test_editRunFunction · 0.85

Calls 3

RESTFunction · 0.92
RESTPayloadFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected