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

Function mockIssueNumberGet

pkg/cmd/issue/edit/edit_test.go:1847–1867  ·  view source on GitHub ↗
(_ *testing.T, reg *httpmock.Registry, number int)

Source from the content-addressed store, hash-verified

1845}
1846
1847func mockIssueNumberGet(_ *testing.T, reg *httpmock.Registry, number int) {
1848 reg.Register(
1849 httpmock.GraphQL(`query IssueByNumber\b`),
1850 httpmock.StringResponse(fmt.Sprintf(`
1851 { "data": { "repository": { "hasIssuesEnabled": true, "issue": {
1852 "id": "%[1]d",
1853 "number": %[1]d,
1854 "url": "https://github.com/OWNER/REPO/issue/%[1]d",
1855 "labels": {
1856 "nodes": [
1857 { "id": "DOCSID", "name": "docs" }
1858 ], "totalCount": 1
1859 },
1860 "projectCards": {
1861 "nodes": [
1862 { "project": { "name": "Roadmap" } }
1863 ], "totalCount": 1
1864 }
1865 } } } }`, number)),
1866 )
1867}
1868
1869func mockIsssueNumberGetWithAssignedActors(_ *testing.T, reg *httpmock.Registry, number int) {
1870 reg.Register(

Callers 2

Test_editRunFunction · 0.85
mockIssueGetFunction · 0.85

Calls 3

GraphQLFunction · 0.92
StringResponseFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected