aboutsummaryrefslogtreecommitdiff
path: root/internal/cvss/v3key_test.go
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-01-31 23:28:22 -0500
committerPaul Duncan <pabs@pablotron.org>2022-01-31 23:28:22 -0500
commit94b148ccdcb88f2544c222f73f5c734ac78ccd96 (patch)
tree23cfa33a5df29cdfb269f5f517217ff457f314fa /internal/cvss/v3key_test.go
parent5c4ff27a0bc70cdefad0c9a68e920e480465c4d9 (diff)
downloadcvez-94b148ccdcb88f2544c222f73f5c734ac78ccd96.tar.bz2
cvez-94b148ccdcb88f2544c222f73f5c734ac78ccd96.zip
internal/cvss: more tests
Diffstat (limited to 'internal/cvss/v3key_test.go')
-rw-r--r--internal/cvss/v3key_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/cvss/v3key_test.go b/internal/cvss/v3key_test.go
index ccf2b8f..517eebd 100644
--- a/internal/cvss/v3key_test.go
+++ b/internal/cvss/v3key_test.go
@@ -122,3 +122,21 @@ func TestV3KeyCategory(t *testing.T) {
})
}
}
+
+func TestInvalidV3KeyName(t *testing.T) {
+ exp := "invalid"
+ got := v3Key(255).Name()
+
+ if got != exp {
+ t.Errorf("got: \"%s\", exp: \"%s\"", got, exp)
+ }
+}
+
+func TestInvalidV3KeyCategory(t *testing.T) {
+ exp := InvalidCategory
+ got := v3Key(255).Category()
+
+ if got != exp {
+ t.Errorf("got: \"%s\", exp: \"%s\"", got, exp)
+ }
+}