Skip to content

Commit

Permalink
Test case coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
djschleen committed Nov 22, 2023
1 parent 2fbe519 commit 2d713c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion renderers/html/html_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func Test_writeTemplate(t *testing.T) {
afs := &afero.Afero{Fs: afero.NewMemMapFs()}

err := writeTemplate(afs, "test.html", models.NewResults([]models.Package{}, models.Summary{}, []models.ScannedFile{}, []string{"GPL"}, "0.0.0", "test", ""))
err := writeTemplate(afs, "test.html", models.NewResults([]models.Package{}, models.Summary{}, []models.ScannedFile{}, []string{"GPL"}, "0.0.0", "test", "low"))
assert.NoError(t, err)

b, err := afs.ReadFile("test.html")
Expand Down
2 changes: 1 addition & 1 deletion renderers/stdout/stdout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestRenderer_Render(t *testing.T) {
},
}
renderer := Renderer{}
renderer.Render(models.NewResults(packages, models.Summary{}, []models.ScannedFile{}, []string{"GPL"}, "0.0.0", "test", ""))
renderer.Render(models.NewResults(packages, models.Summary{}, []models.ScannedFile{}, []string{"GPL"}, "0.0.0", "test", "low"))
})
assert.NotNil(t, output)
assert.Contains(t, output, "golang │ spinner │ v1.19.0 │ CRITICAL")
Expand Down

0 comments on commit 2d713c4

Please sign in to comment.