MCPcopy Index your code
hub / github.com/cli/cli / mockCommentUpdate

Function mockCommentUpdate

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

Source from the content-addressed store, hash-verified

714}
715
716func mockCommentUpdate(t *testing.T, reg *httpmock.Registry) {
717 reg.Register(
718 httpmock.GraphQL(`mutation CommentUpdate\b`),
719 httpmock.GraphQLMutation(`
720 { "data": { "updateIssueComment": { "issueComment": {
721 "url": "https://github.com/OWNER/REPO/pull/123#issuecomment-111"
722 } } } }`,
723 func(inputs map[string]interface{}) {
724 assert.Equal(t, "id1", inputs["id"])
725 assert.Equal(t, "comment body", inputs["body"])
726 }),
727 )
728}
729
730func mockCommentDelete(t *testing.T, reg *httpmock.Registry) {
731 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