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

Function TestIssueCreate_disabledIssues

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

Source from the content-addressed store, hash-verified

1854}
1855
1856func TestIssueCreate_disabledIssues(t *testing.T) {
1857 http := &httpmock.Registry{}
1858 defer http.Verify(t)
1859
1860 http.Register(
1861 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
1862 httpmock.StringResponse(`
1863 { "data": { "repository": {
1864 "id": "REPOID",
1865 "hasIssuesEnabled": false
1866 } } }`),
1867 )
1868
1869 _, err := runCommand(http, true, `-t heres -b johnny`, nil)
1870 if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" {
1871 t.Errorf("error running command `issue create`: %v", err)
1872 }
1873}
1874
1875func TestIssueCreate_AtMeAssignee(t *testing.T) {
1876 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