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

Function TestIssueCreate_disabledIssues

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

Source from the content-addressed store, hash-verified

1871}
1872
1873func TestIssueCreate_disabledIssues(t *testing.T) {
1874 http := &httpmock.Registry{}
1875 defer http.Verify(t)
1876
1877 http.Register(
1878 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
1879 httpmock.StringResponse(`
1880 { "data": { "repository": {
1881 "id": "REPOID",
1882 "hasIssuesEnabled": false
1883 } } }`),
1884 )
1885
1886 _, err := runCommand(http, true, `-t heres -b johnny`, nil)
1887 if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" {
1888 t.Errorf("error running command `issue create`: %v", err)
1889 }
1890}
1891
1892func TestIssueCreate_AtMeAssignee(t *testing.T) {
1893 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