aboutsummaryrefslogtreecommitdiff
path: root/internal/cvss/v2metric_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cvss/v2metric_test.go')
-rw-r--r--internal/cvss/v2metric_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/cvss/v2metric_test.go b/internal/cvss/v2metric_test.go
index b17d2ed..f606ed5 100644
--- a/internal/cvss/v2metric_test.go
+++ b/internal/cvss/v2metric_test.go
@@ -265,3 +265,12 @@ func TestV2MetricString(t *testing.T) {
})
}
}
+
+func TestInvalidV2MetricKey(t *testing.T) {
+ got := v2Metric(255).Key()
+ exp := v2InvalidKey
+
+ if got != exp {
+ t.Errorf("got: \"%s\", exp: \"%s\"", got, exp)
+ }
+}