summaryrefslogtreecommitdiffstats
path: root/pkg/commands/rebasing_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/rebasing_test.go')
-rw-r--r--pkg/commands/rebasing_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/commands/rebasing_test.go b/pkg/commands/rebasing_test.go
index 7c4a954c9..2527cacd9 100644
--- a/pkg/commands/rebasing_test.go
+++ b/pkg/commands/rebasing_test.go
@@ -5,6 +5,7 @@ import (
"regexp"
"testing"
+ "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/test"
"github.com/stretchr/testify/assert"
)
@@ -62,31 +63,31 @@ func TestGitCommandRebaseBranch(t *testing.T) {
func TestGitCommandSkipEditorCommand(t *testing.T) {
cmd := NewDummyGitCommand()
- cmd.OSCommand.SetBeforeExecuteCmd(func(cmd *exec.Cmd) {
+ cmd.OSCommand.SetBeforeExecuteCmd(func(cmdObj oscommands.ICmdObj) {
test.AssertContainsMatch(
t,
- cmd.Env,
+ cmdObj.GetEnvVars(),
regexp.MustCompile("^VISUAL="),
"expected VISUAL to be set for a non-interactive external command",
)
test.AssertContainsMatch(
t,
- cmd.Env,
+ cmdObj.GetEnvVars(),
regexp.MustCompile("^EDITOR="),
"expected EDITOR to be set for a non-interactive external command",
)
test.AssertContainsMatch(
t,
- cmd.Env,
+ cmdObj.GetEnvVars(),
regexp.MustCompile("^GIT_EDITOR="),
"expected GIT_EDITOR to be set for a non-interactive external command",
)
test.AssertContainsMatch(
t,
- cmd.Env,
+ cmdObj.GetEnvVars(),
regexp.MustCompile("^LAZYGIT_CLIENT_COMMAND=EXIT_IMMEDIATELY$"),
"expected LAZYGIT_CLIENT_COMMAND to be set for a non-interactive external command",
)