(t *testing.T)
| 178 | } |
| 179 | |
| 180 | func TestIssueDelete_issuesDisabled(t *testing.T) { |
| 181 | httpRegistry := &httpmock.Registry{} |
| 182 | defer httpRegistry.Verify(t) |
| 183 | |
| 184 | httpRegistry.Register( |
| 185 | httpmock.GraphQL(`query IssueByNumber\b`), |
| 186 | httpmock.StringResponse(` |
| 187 | { |
| 188 | "data": { |
| 189 | "repository": { |
| 190 | "hasIssuesEnabled": false, |
| 191 | "issue": null |
| 192 | } |
| 193 | }, |
| 194 | "errors": [ |
| 195 | { |
| 196 | "type": "NOT_FOUND", |
| 197 | "path": [ |
| 198 | "repository", |
| 199 | "issue" |
| 200 | ], |
| 201 | "message": "Could not resolve to an issue or pull request with the number of 13." |
| 202 | } |
| 203 | ] |
| 204 | }`), |
| 205 | ) |
| 206 | |
| 207 | _, err := runCommand(httpRegistry, nil, true, "13") |
| 208 | if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" { |
| 209 | t.Fatalf("got error: %v", err) |
| 210 | } |
| 211 | } |
nothing calls this directly
no test coverage detected