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

Function mockCommentCreate

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

Source from the content-addressed store, hash-verified

701}
702
703func mockCommentCreate(t *testing.T, reg *httpmock.Registry) {
704 reg.Register(
705 httpmock.GraphQL(`mutation CommentCreate\b`),
706 httpmock.GraphQLMutation(`
707 { "data": { "addComment": { "commentEdge": { "node": {
708 "url": "https://github.com/OWNER/REPO/pull/123#issuecomment-456"
709 } } } } }`,
710 func(inputs map[string]interface{}) {
711 assert.Equal(t, "comment body", inputs["body"])
712 }),
713 )
714}
715
716func mockCommentUpdate(t *testing.T, reg *httpmock.Registry) {
717 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