(t *testing.T)
| 741 | } |
| 742 | |
| 743 | func TestPRView_web_currentBranch(t *testing.T) { |
| 744 | http := &httpmock.Registry{} |
| 745 | defer http.Verify(t) |
| 746 | |
| 747 | shared.StubFinderForRunCommandStyleTests(t, "", &api.PullRequest{URL: "https://github.com/OWNER/REPO/pull/10"}, ghrepo.New("OWNER", "REPO")) |
| 748 | |
| 749 | _, cmdTeardown := run.Stub() |
| 750 | defer cmdTeardown(t) |
| 751 | |
| 752 | output, err := runCommand(http, "blueberries", true, "-w") |
| 753 | if err != nil { |
| 754 | t.Errorf("error running command `pr view`: %v", err) |
| 755 | } |
| 756 | |
| 757 | assert.Equal(t, "", output.String()) |
| 758 | assert.Equal(t, "Opening https://github.com/OWNER/REPO/pull/10 in your browser.\n", output.Stderr()) |
| 759 | assert.Equal(t, "https://github.com/OWNER/REPO/pull/10", output.BrowsedURL) |
| 760 | } |
| 761 | |
| 762 | func TestPRView_web_noResultsForBranch(t *testing.T) { |
| 763 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected