(t *testing.T)
| 341 | } |
| 342 | |
| 343 | func TestIssueView_web_notFound(t *testing.T) { |
| 344 | http := &httpmock.Registry{} |
| 345 | defer http.Verify(t) |
| 346 | |
| 347 | http.Register( |
| 348 | httpmock.GraphQL(`query IssueByNumber\b`), |
| 349 | httpmock.StringResponse(` |
| 350 | { "errors": [ |
| 351 | { "message": "Could not resolve to an Issue with the number of 9999." } |
| 352 | ] } |
| 353 | `), |
| 354 | ) |
| 355 | |
| 356 | _, cmdTeardown := run.Stub() |
| 357 | defer cmdTeardown(t) |
| 358 | |
| 359 | _, err := runCommand(http, true, "-w 9999") |
| 360 | if err == nil || err.Error() != "GraphQL: Could not resolve to an Issue with the number of 9999." { |
| 361 | t.Errorf("error running command `issue view`: %v", err) |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | func TestIssueView_disabledIssues(t *testing.T) { |
| 366 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected