(t *testing.T)
| 632 | } |
| 633 | |
| 634 | func TestPRView_web_currentBranch(t *testing.T) { |
| 635 | http := &httpmock.Registry{} |
| 636 | defer http.Verify(t) |
| 637 | |
| 638 | shared.StubFinderForRunCommandStyleTests(t, "", &api.PullRequest{URL: "https://github.com/OWNER/REPO/pull/10"}, ghrepo.New("OWNER", "REPO")) |
| 639 | |
| 640 | _, cmdTeardown := run.Stub() |
| 641 | defer cmdTeardown(t) |
| 642 | |
| 643 | output, err := runCommand(http, "blueberries", true, "-w") |
| 644 | if err != nil { |
| 645 | t.Errorf("error running command `pr view`: %v", err) |
| 646 | } |
| 647 | |
| 648 | assert.Equal(t, "", output.String()) |
| 649 | assert.Equal(t, "Opening https://github.com/OWNER/REPO/pull/10 in your browser.\n", output.Stderr()) |
| 650 | assert.Equal(t, "https://github.com/OWNER/REPO/pull/10", output.BrowsedURL) |
| 651 | } |
| 652 | |
| 653 | func TestPRView_web_noResultsForBranch(t *testing.T) { |
| 654 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected