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

Function mockIssueNumberGet

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

Source from the content-addressed store, hash-verified

1855}
1856
1857func mockIssueNumberGet(_ *testing.T, reg *httpmock.Registry, number int) {
1858 reg.Register(
1859 httpmock.GraphQL(`query IssueByNumber\b`),
1860 httpmock.StringResponse(fmt.Sprintf(`
1861 { "data": { "repository": { "hasIssuesEnabled": true, "issue": {
1862 "id": "%[1]d",
1863 "number": %[1]d,
1864 "url": "https://github.com/OWNER/REPO/issue/%[1]d",
1865 "labels": {
1866 "nodes": [
1867 { "id": "DOCSID", "name": "docs" }
1868 ], "totalCount": 1
1869 },
1870 "projectCards": {
1871 "nodes": [
1872 { "project": { "name": "Roadmap" } }
1873 ], "totalCount": 1
1874 }
1875 } } } }`, number)),
1876 )
1877}
1878
1879func mockIsssueNumberGetWithAssignedActors(_ *testing.T, reg *httpmock.Registry, number int) {
1880 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