Add separate open command for links and check if branch exists on remote before opening pull request link.

This commit is contained in:
Kristijan Husak 2018-10-17 14:20:15 +02:00
parent c69fce2e9d
commit 990dc8c4ea
11 changed files with 49 additions and 11 deletions

View file

@ -144,7 +144,7 @@ func TestCreatePullRequest(t *testing.T) {
t.Run(s.testName, func(t *testing.T) {
gitCommand := newDummyGitCommand()
gitCommand.OSCommand.command = s.command
gitCommand.OSCommand.Config.GetUserConfig().Set("os.openCommand", "open {{filename}}")
gitCommand.OSCommand.Config.GetUserConfig().Set("os.openLinkCommand", "open {{link}}")
dummyPullRequest := NewPullRequest(gitCommand)
s.test(dummyPullRequest.Create(s.branch))
})