Skip to content

Commit

Permalink
Add test case with array of values
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Mar 31, 2022
1 parent 6044bd6 commit 0b36b50
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/fields/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,22 @@ func Test_parseElementValue(t *testing.T) {
},
fail: true,
},
{
key: "not allowed value in array",
value: []string{"configuration", "display"},
definition: FieldDefinition{
Type: "keyword",
AllowedValues: AllowedValues{
{
Name: "configuration",
},
{
Name: "network",
},
},
},
fail: true,
},
} {
v := Validator{disabledDependencyManagement: true}
t.Run(test.key, func(t *testing.T) {
Expand Down

0 comments on commit 0b36b50

Please sign in to comment.