(t *testing.T)
| 127 | } |
| 128 | |
| 129 | func TestIssueStatus_disabledIssues(t *testing.T) { |
| 130 | http := &httpmock.Registry{} |
| 131 | defer http.Verify(t) |
| 132 | |
| 133 | http.Register( |
| 134 | httpmock.GraphQL(`query UserCurrent\b`), |
| 135 | httpmock.StringResponse(`{"data":{"viewer":{"login":"octocat"}}}`)) |
| 136 | http.Register( |
| 137 | httpmock.GraphQL(`query IssueStatus\b`), |
| 138 | httpmock.StringResponse(` |
| 139 | { "data": { "repository": { |
| 140 | "hasIssuesEnabled": false |
| 141 | } } }`)) |
| 142 | |
| 143 | _, err := runCommand(http, true, "") |
| 144 | if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" { |
| 145 | t.Errorf("error running command `issue status`: %v", err) |
| 146 | } |
| 147 | } |
nothing calls this directly
no test coverage detected