summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_config
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-08 16:02:56 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-09 14:09:53 +1100
commitccf90466fa1d7ed32a7211115d46c59846dfd622 (patch)
tree1f835a00f20833e3ba5379900ef1437eaa464af3 /pkg/commands/git_config
parent16c9b5404d52f3e2b93de7262fff607b18f98cea (diff)
fix test
Diffstat (limited to 'pkg/commands/git_config')
-rw-r--r--pkg/commands/git_config/cached_git_config_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/commands/git_config/cached_git_config_test.go b/pkg/commands/git_config/cached_git_config_test.go
index 1e58b2bf6..6ba2c5b91 100644
--- a/pkg/commands/git_config/cached_git_config_test.go
+++ b/pkg/commands/git_config/cached_git_config_test.go
@@ -55,7 +55,7 @@ func TestGetBool(t *testing.T) {
fake := NewFakeGitConfig(s.mockResponses)
real := NewCachedGitConfig(
func(cmd *exec.Cmd) (string, error) {
- assert.Equal(t, "git config --get --null commit.gpgsign", strings.Join(cmd.Args, " "))
+ assert.Equal(t, "config --get --null commit.gpgsign", strings.Join(cmd.Args[1:], " "))
return fake.Get("commit.gpgsign"), nil
},
utils.NewDummyLog(),
@@ -92,7 +92,7 @@ func TestGet(t *testing.T) {
fake := NewFakeGitConfig(s.mockResponses)
real := NewCachedGitConfig(
func(cmd *exec.Cmd) (string, error) {
- assert.Equal(t, "git config --get --null commit.gpgsign", strings.Join(cmd.Args, " "))
+ assert.Equal(t, "config --get --null commit.gpgsign", strings.Join(cmd.Args[1:], " "))
return fake.Get("commit.gpgsign"), nil
},
utils.NewDummyLog(),
@@ -107,7 +107,7 @@ func TestGet(t *testing.T) {
real := NewCachedGitConfig(
func(cmd *exec.Cmd) (string, error) {
count++
- assert.Equal(t, "git config --get --null commit.gpgsign", strings.Join(cmd.Args, " "))
+ assert.Equal(t, "config --get --null commit.gpgsign", strings.Join(cmd.Args[1:], " "))
return "blah", nil
},
utils.NewDummyLog(),