1
0
mirror of https://github.com/securego/gosec.git synced 2025-07-15 01:04:43 +02:00

enable ginkgolinter linter (#948)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2023-04-04 08:52:59 +02:00
committed by GitHub
parent 780ebd0819
commit 68b520165d
6 changed files with 41 additions and 40 deletions

View File

@ -21,7 +21,7 @@ var _ = Describe("Call List", func() {
})
It("should be possible to add a single call", func() {
Expect(calls).Should(HaveLen(0))
Expect(calls).Should(BeEmpty())
calls.Add("foo", "bar")
Expect(calls).Should(HaveLen(1))
@ -32,7 +32,7 @@ var _ = Describe("Call List", func() {
})
It("should be possible to add multiple calls at once", func() {
Expect(calls).Should(HaveLen(0))
Expect(calls).Should(BeEmpty())
calls.AddAll("fmt", "Sprint", "Sprintf", "Printf", "Println")
expected := map[string]bool{
@ -46,14 +46,14 @@ var _ = Describe("Call List", func() {
})
It("should be possible to add pointer call", func() {
Expect(calls).Should(HaveLen(0))
Expect(calls).Should(BeEmpty())
calls.Add("*bytes.Buffer", "WriteString")
actual := calls.ContainsPointer("*bytes.Buffer", "WriteString")
Expect(actual).Should(BeTrue())
})
It("should be possible to check pointer call", func() {
Expect(calls).Should(HaveLen(0))
Expect(calls).Should(BeEmpty())
calls.Add("bytes.Buffer", "WriteString")
actual := calls.ContainsPointer("*bytes.Buffer", "WriteString")
Expect(actual).Should(BeTrue())