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

Function mockCommentUpdate

pkg/cmd/pr/comment/comment_test.go:928–940  ·  view source on GitHub ↗
(t *testing.T, reg *httpmock.Registry, wantBody string)

Source from the content-addressed store, hash-verified

926}
927
928func mockCommentUpdate(t *testing.T, reg *httpmock.Registry, wantBody string) {
929 reg.Register(
930 httpmock.GraphQL(`mutation CommentUpdate\b`),
931 httpmock.GraphQLMutation(`
932 { "data": { "updateIssueComment": { "issueComment": {
933 "url": "https://github.com/OWNER/REPO/pull/123#issuecomment-111"
934 } } } }`,
935 func(inputs map[string]any) {
936 assert.Equal(t, "id1", inputs["id"])
937 assert.Equal(t, wantBody, inputs["body"])
938 }),
939 )
940}
941
942func mockCommentDelete(t *testing.T, reg *httpmock.Registry) {
943 reg.Register(

Callers 1

Test_commentRunFunction · 0.70

Calls 4

GraphQLFunction · 0.92
GraphQLMutationFunction · 0.92
EqualMethod · 0.80
RegisterMethod · 0.45

Tested by

no test coverage detected