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

Function mockCommentCreate

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

Source from the content-addressed store, hash-verified

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