gosec/cwe/data_test.go
2021-05-31 10:44:12 +02:00

21 lines
499 B
Go

package cwe_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/securego/gosec/v2/cwe"
)
var _ = Describe("CWE data", func() {
BeforeEach(func() {
})
Context("when consulting cwe data", func() {
It("it should retrieves the weakness", func() {
weakness := cwe.Get("798")
Expect(weakness).ShouldNot(BeNil())
Expect(weakness.ID).ShouldNot(BeNil())
Expect(weakness.Name).ShouldNot(BeNil())
Expect(weakness.Description).ShouldNot(BeNil())
})
})
})