From 9cf9d01b19423a04cf25250eabc8259e79046bfe Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 16 May 2024 12:29:49 -0700 Subject: [PATCH] test: ensure basic check_has works with string arrays properly --- tooling/check/check_has_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tooling/check/check_has_test.go diff --git a/tooling/check/check_has_test.go b/tooling/check/check_has_test.go new file mode 100644 index 000000000..3ba0ec8d5 --- /dev/null +++ b/tooling/check/check_has_test.go @@ -0,0 +1,20 @@ +package check + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCheckHas(t *testing.T) { + // Create a Check instance + check := Has("value1", "value2", "value3") + + // Test data + testData := []string{"value1", "value2", "value3"} + + // Call .Check on the instance + checkOutput := check.Check(testData) + + assert.True(t, checkOutput.Success, checkOutput.Reason) +}