Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
Remove redundant articles
  • Loading branch information
seachicken committed Oct 28, 2023
1 parent 8383464 commit c653eb6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func Test_ShouldBeDeletableWhenPRCheckoutBranchesAssociatedWithUpstreamSquashAnd
assert.Equal(t, shared.NotDeletable, actual[1].State)
}

func Test_ShouldBeDeletableWhenBranchIsCheckedOutWithTheCheckIsFalse(t *testing.T) {
func Test_ShouldBeDeletableWhenBranchIsCheckedOutWithCheckIsFalse(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -289,7 +289,7 @@ func Test_ShouldBeDeletableWhenBranchIsCheckedOutWithTheCheckIsFalse(t *testing.
assert.Equal(t, shared.NotDeletable, actual[1].State)
}

func Test_ShouldBeDeletableWhenBranchIsCheckedOutWithTheCheckIsTrue(t *testing.T) {
func Test_ShouldBeDeletableWhenBranchIsCheckedOutWithCheckIsTrue(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -694,7 +694,7 @@ func Test_BranchesAndPRsAreNotAssociatedWhenManyLocalCommitsAreAhead(t *testing.
assert.Equal(t, shared.NotDeletable, actual[1].State)
}

func Test_ShouldBeNoCommitHistoryWhenTheFirstCommitOfATopicBranchIsAssociatedWithTheDefaultBranch(t *testing.T) {
func Test_ShouldBeNoCommitHistoryWhenFirstCommitOfATopicBranchIsAssociatedWithDefaultBranch(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -772,7 +772,7 @@ func Test_ShouldBeNoCommitHistoryWhenDetachedBranch(t *testing.T) {
assert.Equal(t, shared.NotDeletable, actual[1].State)
}

func Test_ReturnsAnErrorWhenGetRemoteNamesFails(t *testing.T) {
func Test_ReturnsErrorWhenGetRemoteNamesFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand All @@ -784,7 +784,7 @@ func Test_ReturnsAnErrorWhenGetRemoteNamesFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_DoesNotReturnsAnErrorWhenGetSshConfigFails(t *testing.T) {
func Test_DoesNotReturnsErrorWhenGetSshConfigFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -820,7 +820,7 @@ func Test_DoesNotReturnsAnErrorWhenGetSshConfigFails(t *testing.T) {
assert.Nil(t, err)
}

func Test_ReturnsAnErrorWhenGetRepoNamesFails(t *testing.T) {
func Test_ReturnsErrorWhenGetRepoNamesFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand All @@ -835,7 +835,7 @@ func Test_ReturnsAnErrorWhenGetRepoNamesFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenCheckReposFails(t *testing.T) {
func Test_ReturnsErrorWhenCheckReposFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand All @@ -851,7 +851,7 @@ func Test_ReturnsAnErrorWhenCheckReposFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetBranchNamesFails(t *testing.T) {
func Test_ReturnsErrorWhenGetBranchNamesFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand All @@ -868,7 +868,7 @@ func Test_ReturnsAnErrorWhenGetBranchNamesFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetMergedBranchNames(t *testing.T) {
func Test_ReturnsErrorWhenGetMergedBranchNames(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand All @@ -886,7 +886,7 @@ func Test_ReturnsAnErrorWhenGetMergedBranchNames(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetLogFails(t *testing.T) {
func Test_ReturnsErrorWhenGetLogFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -914,7 +914,7 @@ func Test_ReturnsAnErrorWhenGetLogFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetAssociatedRefNamesFails(t *testing.T) {
func Test_ReturnsErrorWhenGetAssociatedRefNamesFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -946,7 +946,7 @@ func Test_ReturnsAnErrorWhenGetAssociatedRefNamesFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetPullRequestsFails(t *testing.T) {
func Test_ReturnsErrorWhenGetPullRequestsFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -979,7 +979,7 @@ func Test_ReturnsAnErrorWhenGetPullRequestsFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenGetUncommittedChangesFails(t *testing.T) {
func Test_ReturnsErrorWhenGetUncommittedChangesFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down Expand Up @@ -1015,7 +1015,7 @@ func Test_ReturnsAnErrorWhenGetUncommittedChangesFails(t *testing.T) {
assert.NotNil(t, err)
}

func Test_ReturnsAnErrorWhenCheckoutBranchFails(t *testing.T) {
func Test_ReturnsErrorWhenCheckoutBranchFails(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
)

func Test_DeletingBranchesWhenTheDryRunOptionIsFalse(t *testing.T) {
func Test_DeletingBranchesWhenDryRunOptionIsFalse(t *testing.T) {
onlyCI(t)

results := captureOutput(func() { runMain(false, false) })
Expand All @@ -20,7 +20,7 @@ func Test_DeletingBranchesWhenTheDryRunOptionIsFalse(t *testing.T) {
assert.Contains(t, results, expected)
}

func Test_DoNotDeleteBranchesWhenTheDryRunOptionIsTrue(t *testing.T) {
func Test_DoNotDeleteBranchesWhenDryRunOptionIsTrue(t *testing.T) {
onlyCI(t)

results := captureOutput(func() { runMain(true, false) })
Expand Down

0 comments on commit c653eb6

Please sign in to comment.