Skip to content

Commit

Permalink
feat: add a contains bool test
Browse files Browse the repository at this point in the history
  • Loading branch information
bschaatsbergen committed Mar 31, 2024
1 parent 7a86741 commit 544803c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions internal/provider/contains_function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,28 @@ output "test" {
})
}

func TestContainsFunction_bool(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
TerraformVersionChecks: []tfversion.TerraformVersionCheck{
tfversion.SkipBelow(version.Must(version.NewVersion(MinimalRequiredTerraformVersion))),
},
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: `
output "test" {
value = provider::assert::contains([true, false, true], true)
}
`,
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckOutput("test", "true"),
),
},
},
})
}

func TestContainsFunction_numberFloat(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
Expand Down

0 comments on commit 544803c

Please sign in to comment.