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