summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-09-19 19:23:31 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-09-19 19:23:31 +1000
commit64f0eeb42e8c19251f0ca823e43c62468066474c (patch)
tree413486d4b950c901068d418224c5f2728b3c438c
parentfcaf4e339c4e76aafb9e89114a7eabe1bcbe0362 (diff)
fix specs
-rw-r--r--pkg/commands/git_test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go
index 6e3b81bf5..790a34690 100644
--- a/pkg/commands/git_test.go
+++ b/pkg/commands/git_test.go
@@ -1225,7 +1225,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
testName string
command func() (func(string, ...string) *exec.Cmd, *[][]string)
test func(*[][]string, error)
- file File
+ file *File
removeFile func(string) error
}
@@ -1247,7 +1247,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
{"reset", "--", "test"},
})
},
- File{
+ &File{
Name: "test",
HasStagedChanges: true,
},
@@ -1270,7 +1270,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
assert.EqualError(t, err, "an error occurred when removing file")
assert.Len(t, *cmdsCalled, 0)
},
- File{
+ &File{
Name: "test",
Tracked: false,
},
@@ -1295,7 +1295,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
{"checkout", "--", "test"},
})
},
- File{
+ &File{
Name: "test",
Tracked: true,
HasStagedChanges: false,
@@ -1321,7 +1321,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
{"checkout", "--", "test"},
})
},
- File{
+ &File{
Name: "test",
Tracked: true,
HasStagedChanges: false,
@@ -1348,7 +1348,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
{"checkout", "--", "test"},
})
},
- File{
+ &File{
Name: "test",
Tracked: true,
HasStagedChanges: true,
@@ -1374,7 +1374,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
{"reset", "--", "test"},
})
},
- File{
+ &File{
Name: "test",
Tracked: false,
HasStagedChanges: true,
@@ -1398,7 +1398,7 @@ func TestGitCommandRemoveFile(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, *cmdsCalled, 0)
},
- File{
+ &File{
Name: "test",
Tracked: false,
HasStagedChanges: false,
@@ -1484,7 +1484,7 @@ func TestGitCommandGetCommits(t *testing.T) {
type scenario struct {
testName string
command func(string, ...string) *exec.Cmd
- test func([]Commit)
+ test func([]*Commit)
}
scenarios := []scenario{
@@ -1504,7 +1504,7 @@ func TestGitCommandGetCommits(t *testing.T) {
return nil
},
- func(commits []Commit) {
+ func(commits []*Commit) {
assert.Len(t, commits, 0)
},
},
@@ -1524,9 +1524,9 @@ func TestGitCommandGetCommits(t *testing.T) {
return nil
},
- func(commits []Commit) {
+ func(commits []*Commit) {
assert.Len(t, commits, 2)
- assert.EqualValues(t, []Commit{
+ assert.EqualValues(t, []*Commit{
{
Sha: "8a2bb0e",
Name: "commit 1",