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

Function mockCommentCreate

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

Source from the content-addressed store, hash-verified

913}
914
915func mockCommentCreate(t *testing.T, reg *httpmock.Registry, wantBody string) {
916 reg.Register(
917 httpmock.GraphQL(`mutation CommentCreate\b`),
918 httpmock.GraphQLMutation(`
919 { "data": { "addComment": { "commentEdge": { "node": {
920 "url": "https://github.com/OWNER/REPO/pull/123#issuecomment-456"
921 } } } } }`,
922 func(inputs map[string]any) {
923 assert.Equal(t, wantBody, inputs["body"])
924 }),
925 )
926}
927
928func mockCommentUpdate(t *testing.T, reg *httpmock.Registry, wantBody string) {
929 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