Skip to content

Commit

Permalink
fix bug 418 typo while checking jira issue count
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole authored and andream16 committed Oct 12, 2024
1 parent b39f739 commit 7a7389a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions pkg/templating/template_description.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ func EnrichedIssueWithSeverityText(severity string) enrichedIssueOption {
// EnrichedIssueWithCount allows customising the Enriched Issue's Count.
func EnrichedIssueWithCount(count uint) enrichedIssueOption {
return func(ei *enrichedIssue) error {
if count <= 0 {
return errors.Errorf("invalid count %d", count)
}
ei.Count = count
return nil
}
Expand Down
9 changes: 6 additions & 3 deletions pkg/templating/template_description_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,17 @@ func TestDescriptionOptions(t *testing.T) {
},
},
{
name: "0 count returns err",
name: "0 count returns no err",
args: args{
option: EnrichedIssueWithCount(0),
},
wantErr: true,
wantErr: false,
expectedEnrichedIssue: &enrichedIssue{
Count: 0,
},
},
{
name: "positive count text returns no err",
name: "positive count returns no err",
args: args{
option: EnrichedIssueWithCount(420),
},
Expand Down

0 comments on commit 7a7389a

Please sign in to comment.