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

Function TestIssueCreate_disabledIssues

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

Source from the content-addressed store, hash-verified

1812}
1813
1814func TestIssueCreate_disabledIssues(t *testing.T) {
1815 http := &httpmock.Registry{}
1816 defer http.Verify(t)
1817
1818 http.Register(
1819 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
1820 httpmock.StringResponse(`
1821 { "data": { "repository": {
1822 "id": "REPOID",
1823 "hasIssuesEnabled": false
1824 } } }`),
1825 )
1826
1827 _, err := runCommand(http, true, `-t heres -b johnny`, nil)
1828 if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" {
1829 t.Errorf("error running command `issue create`: %v", err)
1830 }
1831}
1832
1833func TestIssueCreate_AtMeAssignee(t *testing.T) {
1834 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