MCPcopy
hub / github.com/cli/cli / mockCommentCreate

Function mockCommentCreate

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

Source from the content-addressed store, hash-verified

682}
683
684func mockCommentCreate(t *testing.T, reg *httpmock.Registry) {
685 reg.Register(
686 httpmock.GraphQL(`mutation CommentCreate\b`),
687 httpmock.GraphQLMutation(`
688 { "data": { "addComment": { "commentEdge": { "node": {
689 "url": "https://github.com/OWNER/REPO/issues/123#issuecomment-456"
690 } } } } }`,
691 func(inputs map[string]interface{}) {
692 assert.Equal(t, "ISSUE-ID", inputs["subjectId"])
693 assert.Equal(t, "comment body", inputs["body"])
694 }),
695 )
696}
697
698func mockCommentUpdate(t *testing.T, reg *httpmock.Registry) {
699 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