Skip to content

Commit 9cf9d01

Browse files
committed
test: ensure basic check_has works with string arrays properly
1 parent 8a4233d commit 9cf9d01

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tooling/check/check_has_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package check
2+
3+
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/assert"
7+
)
8+
9+
func TestCheckHas(t *testing.T) {
10+
// Create a Check instance
11+
check := Has("value1", "value2", "value3")
12+
13+
// Test data
14+
testData := []string{"value1", "value2", "value3"}
15+
16+
// Call .Check on the instance
17+
checkOutput := check.Check(testData)
18+
19+
assert.True(t, checkOutput.Success, checkOutput.Reason)
20+
}

0 commit comments

Comments
 (0)