(t *testing.T)
| 428 | } |
| 429 | |
| 430 | func TestPRStatus_detachedHead(t *testing.T) { |
| 431 | http := initFakeHTTP() |
| 432 | defer http.Verify(t) |
| 433 | http.Register(httpmock.GraphQL(`query PullRequestStatus\b`), httpmock.StringResponse(`{"data": {}}`)) |
| 434 | |
| 435 | output, err := runCommand(http, "", true, "") |
| 436 | if err != nil { |
| 437 | t.Errorf("error running command `pr status`: %v", err) |
| 438 | } |
| 439 | |
| 440 | expected := ` |
| 441 | Relevant pull requests in OWNER/REPO |
| 442 | |
| 443 | Current branch |
| 444 | There is no current branch |
| 445 | |
| 446 | Created by you |
| 447 | You have no open pull requests |
| 448 | |
| 449 | Requesting a code review from you |
| 450 | You have no pull requests to review |
| 451 | |
| 452 | ` |
| 453 | if output.String() != expected { |
| 454 | t.Errorf("expected %q, got %q", expected, output.String()) |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | func TestPRStatus_error_ReadBranchConfig(t *testing.T) { |
| 459 | rs, cleanup := run.Stub() |
nothing calls this directly
no test coverage detected