Skip to content

Commit

Permalink
chore: fix sort invalid tag test, minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderblue committed Jan 25, 2021
1 parent c2eb966 commit 038d6cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions cmd/git-chglog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ func CreateApp(actionFunc cli.ActionFunc) *cli.App {
Usage: "Regular expression of tag filter. Is specified, only matched tags will be picked",
},

// sort-by-date
cli.BoolFlag{
Name: "sort-by-date",
Usage: "Sort tags by date of creation. Use with caution as there are known issues when generating a changelog that contains multiple major versions.",
},

// sort-by-version
cli.BoolFlag{
Name: "sort-by-version",
Expand Down
6 changes: 3 additions & 3 deletions tag_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestTagReader(t *testing.T) {
)
}

func TestTagReaderSortByTag(t *testing.T) {
func TestTagReaderSortTagsByVersion(t *testing.T) {
assert := assert.New(t)
client := &mockClient{
ReturnExec: func(subcmd string, args ...string) (string, error) {
Expand Down Expand Up @@ -236,7 +236,7 @@ func TestTagReaderSortByTag(t *testing.T) {
assert.Equal(expected, actual)
}

func TestTagReaderSortByTagWithInvalidTag(t *testing.T) {
func TestTagReaderSortTagsByVersionWithInvalidTag(t *testing.T) {
assert := assert.New(t)
client := &mockClient{
ReturnExec: func(subcmd string, args ...string) (string, error) {
Expand All @@ -255,6 +255,6 @@ func TestTagReaderSortByTagWithInvalidTag(t *testing.T) {
},
}

_, err := newTagReader(client, "", false).ReadAll()
_, err := newTagReader(client, "", true).ReadAll()
assert.Error(err)
}

0 comments on commit 038d6cb

Please sign in to comment.