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

Function mockCommentCreate

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

Source from the content-addressed store, hash-verified

958}
959
960func mockCommentCreate(t *testing.T, reg *httpmock.Registry) {
961 reg.Register(
962 httpmock.GraphQL(`mutation CommentCreate\b`),
963 httpmock.GraphQLMutation(`
964 { "data": { "addComment": { "commentEdge": { "node": {
965 "url": "https://github.com/OWNER/REPO/issues/123#issuecomment-456"
966 } } } } }`,
967 func(inputs map[string]any) {
968 assert.Equal(t, "ISSUE-ID", inputs["subjectId"])
969 assert.Equal(t, "comment body", inputs["body"])
970 }),
971 )
972}
973
974func mockCommentUpdate(t *testing.T, reg *httpmock.Registry) {
975 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