From 642a5710bcda5584cb59bb30b4a474b1466385a2 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 | 21 +++++++++++++++++++++ 1 file changed, 21 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..a7b56ef1b --- /dev/null +++ b/tooling/check/check_has_test.go @@ -0,0 +1,21 @@ +package check + +import ( + "testing" +) + +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 + output := check.Check(testData) + + // Assert that the check was successful + if !output.Success { + t.Errorf("Check failed: %s", output.Reason) + } +}