Skip to content

Commit 9fb6d99

Browse files
authored
Add tests to new severity (#1294)
1 parent f8b21a9 commit 9fb6d99

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

utils/outputwriter/icons_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func TestGetSmallSeverityTag(t *testing.T) {
1212
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallMedium.svg\" alt=\"\"/>", getSmallSeverityTag("meDium"))
1313
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallLow.svg\" alt=\"\"/>", getSmallSeverityTag("low"))
1414
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallUnknown.svg\" alt=\"\"/>", getSmallSeverityTag("none"))
15+
assert.Equal(t, "<img src=\"https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/smallNoIssues.svg\" alt=\"\"/>", getSmallSeverityTag("scanned - no issues"))
1516
}
1617

1718
func TestGetSeverityTag(t *testing.T) {
@@ -20,6 +21,7 @@ func TestGetSeverityTag(t *testing.T) {
2021
assert.Equal(t, "![medium](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableMediumSeverity.png)<br>", getSeverityTag("meDium", "Undetermined"))
2122
assert.Equal(t, "![low](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableLowSeverity.png)<br>", getSeverityTag("low", "Applicable"))
2223
assert.Equal(t, "![unknown](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableUnknownSeverity.png)<br>", getSeverityTag("none", "Applicable"))
24+
assert.Equal(t, "![scanned - no issues found](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noIssues.png)<br>", getSeverityTag("scanned - no issues", "Applicable"))
2325
}
2426

2527
func TestGetSeverityTagNotApplicable(t *testing.T) {
@@ -28,6 +30,7 @@ func TestGetSeverityTagNotApplicable(t *testing.T) {
2830
assert.Equal(t, "![medium (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableMedium.png)<br>", getSeverityTag("meDium", "Not Applicable"))
2931
assert.Equal(t, "![low (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableLow.png)<br>", getSeverityTag("low", "Not Applicable"))
3032
assert.Equal(t, "![unknown (not applicable)](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableUnknown.png)<br>", getSeverityTag("none", "Not Applicable"))
33+
assert.Equal(t, "![scanned - no issues found](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noIssues.png)<br>", getSeverityTag("scanned - no issues", "Not Applicable"))
3134
}
3235

3336
func TestGetVulnerabilitiesBanners(t *testing.T) {

0 commit comments

Comments
 (0)