MCPcopy
hub / github.com/cli/cli / TestIssueCreate_disabledIssues

Function TestIssueCreate_disabledIssues

pkg/cmd/issue/create/create_test.go:1362–1379  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1360}
1361
1362func TestIssueCreate_disabledIssues(t *testing.T) {
1363 http := &httpmock.Registry{}
1364 defer http.Verify(t)
1365
1366 http.Register(
1367 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
1368 httpmock.StringResponse(`
1369 { "data": { "repository": {
1370 "id": "REPOID",
1371 "hasIssuesEnabled": false
1372 } } }`),
1373 )
1374
1375 _, err := runCommand(http, true, `-t heres -b johnny`, nil)
1376 if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" {
1377 t.Errorf("error running command `issue create`: %v", err)
1378 }
1379}
1380
1381func TestIssueCreate_AtMeAssignee(t *testing.T) {
1382 http := &httpmock.Registry{}

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