diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-27 19:29:22 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-27 19:29:22 +1000 |
commit | 30a066aa41cedabeebac0f9e747073ff33805893 (patch) | |
tree | 83f4d9416f90c987adb462cca99c49573c2f326f /pkg/commands | |
parent | 1dcc3363d041733d5d571e2c1075a8120a7d581f (diff) |
remove redundant test
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/commit_list_builder_test.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/pkg/commands/commit_list_builder_test.go b/pkg/commands/commit_list_builder_test.go index de49bd6a8..590ee6f4a 100644 --- a/pkg/commands/commit_list_builder_test.go +++ b/pkg/commands/commit_list_builder_test.go @@ -21,45 +21,6 @@ func NewDummyCommitListBuilder() *CommitListBuilder { } } -// TestCommitListBuilderGetUnpushedCommits is a function. -func TestCommitListBuilderGetUnpushedCommits(t *testing.T) { - type scenario struct { - testName string - command func(string, ...string) *exec.Cmd - test func(map[string]bool) - } - - scenarios := []scenario{ - { - "Can't retrieve pushable commits", - func(string, ...string) *exec.Cmd { - return exec.Command("test") - }, - func(pushables map[string]bool) { - assert.EqualValues(t, map[string]bool{}, pushables) - }, - }, - { - "Retrieve pushable commits", - func(cmd string, args ...string) *exec.Cmd { - return exec.Command("echo", "8a2bb0e\n78976bc") - }, - func(pushables map[string]bool) { - assert.Len(t, pushables, 2) - assert.EqualValues(t, map[string]bool{"8a2bb0e": true, "78976bc": true}, pushables) - }, - }, - } - - for _, s := range scenarios { - t.Run(s.testName, func(t *testing.T) { - c := NewDummyCommitListBuilder() - c.OSCommand.SetCommand(s.command) - s.test(c.getUnpushedCommits("HEAD")) - }) - } -} - // TestCommitListBuilderGetMergeBase is a function. func TestCommitListBuilderGetMergeBase(t *testing.T) { type scenario struct { |