MCPcopy
hub / github.com/cli/cli / mockSuccessfulEditResponse

Function mockSuccessfulEditResponse

pkg/cmd/release/edit/edit_test.go:475–481  ·  view source on GitHub ↗
(reg *httpmock.Registry, cb func(params map[string]interface{}))

Source from the content-addressed store, hash-verified

473}
474
475func mockSuccessfulEditResponse(reg *httpmock.Registry, cb func(params map[string]interface{})) {
476 matcher := httpmock.REST("PATCH", "repos/OWNER/REPO/releases/12345")
477 responder := httpmock.RESTPayload(201, `{
478 "html_url": "https://github.com/OWNER/REPO/releases/tag/v1.2.3"
479 }`, cb)
480 reg.Register(matcher, responder)
481}
482
483func boolPtr(b bool) *bool {
484 return &b

Callers 1

Test_editRunFunction · 0.85

Calls 3

RESTFunction · 0.92
RESTPayloadFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected