MCPcopy
hub / github.com/cli/cli / TestIssueList_disabledIssues

Function TestIssueList_disabledIssues

pkg/cmd/issue/list/list_test.go:223–239  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestIssueList_disabledIssues(t *testing.T) {
224 http := &httpmock.Registry{}
225 defer http.Verify(t)
226
227 http.Register(
228 httpmock.GraphQL(`query IssueList\b`),
229 httpmock.StringResponse(`
230 { "data": { "repository": {
231 "hasIssuesEnabled": false
232 } } }`),
233 )
234
235 _, err := runCommand(http, true, "")
236 if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" {
237 t.Errorf("error running command `issue list`: %v", err)
238 }
239}
240
241// TODO advancedIssueSearchCleanup
242// Simplify this test to only a single test case once GHES 3.17 support ends.

Callers

nothing calls this directly

Calls 7

VerifyMethod · 0.95
RegisterMethod · 0.95
GraphQLFunction · 0.92
StringResponseFunction · 0.92
runCommandFunction · 0.70
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected