(t *testing.T)
| 403 | } |
| 404 | |
| 405 | func TestPRStatus_blankSlateRepoOverride(t *testing.T) { |
| 406 | http := initFakeHTTP() |
| 407 | defer http.Verify(t) |
| 408 | http.Register(httpmock.GraphQL(`query PullRequestStatus\b`), httpmock.StringResponse(`{"data": {}}`)) |
| 409 | |
| 410 | output, err := runCommand(http, "blueberries", true, "--repo OWNER/REPO") |
| 411 | if err != nil { |
| 412 | t.Errorf("error running command `pr status`: %v", err) |
| 413 | } |
| 414 | |
| 415 | expected := ` |
| 416 | Relevant pull requests in OWNER/REPO |
| 417 | |
| 418 | Created by you |
| 419 | You have no open pull requests |
| 420 | |
| 421 | Requesting a code review from you |
| 422 | You have no pull requests to review |
| 423 | |
| 424 | ` |
| 425 | if output.String() != expected { |
| 426 | t.Errorf("expected %q, got %q", expected, output.String()) |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | func TestPRStatus_detachedHead(t *testing.T) { |
| 431 | http := initFakeHTTP() |
nothing calls this directly
no test coverage detected