(t *testing.T)
| 351 | } |
| 352 | |
| 353 | func TestIssueView_disabledIssues(t *testing.T) { |
| 354 | http := &httpmock.Registry{} |
| 355 | defer http.Verify(t) |
| 356 | |
| 357 | http.Register( |
| 358 | httpmock.GraphQL(`query IssueByNumber\b`), |
| 359 | httpmock.StringResponse(` |
| 360 | { |
| 361 | "data": |
| 362 | { "repository": { |
| 363 | "id": "REPOID", |
| 364 | "hasIssuesEnabled": false |
| 365 | } |
| 366 | }, |
| 367 | "errors": [ |
| 368 | { |
| 369 | "type": "NOT_FOUND", |
| 370 | "path": [ |
| 371 | "repository", |
| 372 | "issue" |
| 373 | ], |
| 374 | "message": "Could not resolve to an issue or pull request with the number of 6666." |
| 375 | } |
| 376 | ] |
| 377 | } |
| 378 | `), |
| 379 | ) |
| 380 | |
| 381 | _, err := runCommand(http, true, `6666`) |
| 382 | if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" { |
| 383 | t.Errorf("error running command `issue view`: %v", err) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | func TestIssueView_tty_Comments(t *testing.T) { |
| 388 | tests := map[string]struct { |
nothing calls this directly
no test coverage detected