From 30a066aa41cedabeebac0f9e747073ff33805893 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 27 Aug 2020 19:29:22 +1000 Subject: [PATCH] remove redundant test --- pkg/commands/commit_list_builder_test.go | 39 ------------------------ 1 file changed, 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 {