Skip to content

Commit

Permalink
imagefilter_test: add test for exception
Browse files Browse the repository at this point in the history
Add a test for the fail-case.
  • Loading branch information
schuellerf committed Jan 31, 2025
1 parent b6de0d5 commit 43c0183
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/imagefilter/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ func TestSupportedOutputFormats(t *testing.T) {
assert.Contains(t, formatters, "short")
assert.True(t, sort.StringsAreSorted(formatters))
}

func TestResultsFormatterError(t *testing.T) {
fmter, err := imagefilter.NewResultsFormatter(imagefilter.OutputFormat("unsupported"))
assert.Error(t, err)
assert.Nil(t, fmter)
}

0 comments on commit 43c0183

Please sign in to comment.