mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
Remove unnecessary nil error in NewPullRequest.
This commit is contained in:
@ -44,11 +44,11 @@ func getServices() []*Service {
|
||||
}
|
||||
|
||||
// NewPullRequest creates new instance of PullRequest
|
||||
func NewPullRequest(gitCommand *GitCommand) (*PullRequest, error) {
|
||||
func NewPullRequest(gitCommand *GitCommand) *PullRequest {
|
||||
return &PullRequest{
|
||||
GitServices: getServices(),
|
||||
GitCommand: gitCommand,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
// Create opens link to new pull request in browser
|
||||
|
@ -1,10 +1,11 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetRepoInfoFromURL(t *testing.T) {
|
||||
@ -144,7 +145,7 @@ func TestCreatePullRequest(t *testing.T) {
|
||||
gitCommand := newDummyGitCommand()
|
||||
gitCommand.OSCommand.command = s.command
|
||||
gitCommand.OSCommand.Config.GetUserConfig().Set("os.openCommand", "open {{filename}}")
|
||||
dummyPullRequest, _ := NewPullRequest(gitCommand)
|
||||
dummyPullRequest := NewPullRequest(gitCommand)
|
||||
s.test(dummyPullRequest.Create(s.branch))
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user