diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 18:51:07 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 23432dd90976976004ad9b4c6aca4d2ed8318c37 (patch) | |
tree | f261f473324ed43036bc30cb4682badeaaac14a3 | |
parent | 148f601bcbb36772464fa4decdfea10a30e7e2ee (diff) |
remove test
-rw-r--r-- | pkg/commands/git_test.go | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index dc04e2018..6e0d345ee 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -1814,44 +1814,6 @@ func TestGitCommandDiscardOldFileChanges(t *testing.T) { } } -// TestGitCommandShowCommitFile is a function. -func TestGitCommandShowCommitFile(t *testing.T) { - type scenario struct { - testName string - commitSha string - fileName string - command func(string, ...string) *exec.Cmd - test func(string, error) - } - - scenarios := []scenario{ - { - "valid case", - "123456", - "hello.txt", - test.CreateMockCommand(t, []*test.CommandSwapper{ - { - Expect: "git show --no-renames --color=never 123456 -- hello.txt", - Replace: "echo -n hello", - }, - }), - func(str string, err error) { - assert.NoError(t, err) - assert.Equal(t, "hello", str) - }, - }, - } - - gitCmd := NewDummyGitCommand() - - for _, s := range scenarios { - t.Run(s.testName, func(t *testing.T) { - gitCmd.OSCommand.command = s.command - s.test(gitCmd.ShowFileDiff(s.commitSha+"^", s.commitSha, false, s.fileName, true)) - }) - } -} - // TestGitCommandDiscardUnstagedFileChanges is a function. func TestGitCommandDiscardUnstagedFileChanges(t *testing.T) { type scenario struct { |