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

Function mockIssueUpdateWithBody

pkg/cmd/issue/edit/edit_test.go:2005–2014  ·  view source on GitHub ↗

mockIssueUpdateWithBody stubs the issue update and asserts the body it carries.

(t *testing.T, reg *httpmock.Registry, wantBody string)

Source from the content-addressed store, hash-verified

2003// mockIssueUpdateWithBody stubs the issue update and asserts the body it
2004// carries.
2005func mockIssueUpdateWithBody(t *testing.T, reg *httpmock.Registry, wantBody string) {
2006 reg.Register(
2007 httpmock.GraphQL(`mutation IssueUpdate\b`),
2008 httpmock.GraphQLMutation(`
2009 { "data": { "updateIssue": { "__typename": "" } } }`,
2010 func(inputs map[string]any) {
2011 assert.Equal(t, wantBody, inputs["body"])
2012 }),
2013 )
2014}
2015
2016func mockIssueUpdateApiActors(t *testing.T, reg *httpmock.Registry) {
2017 reg.Register(

Callers 1

Test_editRunFunction · 0.85

Calls 4

GraphQLFunction · 0.92
GraphQLMutationFunction · 0.92
EqualMethod · 0.80
RegisterMethod · 0.45

Tested by

no test coverage detected