Skip to content

Commit

Permalink
internal/appsec/waf: add nested WAF object test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellzy committed Apr 4, 2022
1 parent 5f76e74 commit 583dbf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/appsec/waf/waf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,11 @@ func TestDecoder(t *testing.T) {
ExpectedValue: map[string]interface{}{},
Object: objBuilder(map[string]interface{}{}),
},
{
Name: "nested",
ExpectedValue: []interface{}{"1", "2", map[string]interface{}{"foo": "bar", "bar": "baz", "baz": "foo"}, []interface{}{"1", "2", "3"}},
Object: objBuilder([]interface{}{1, "2", map[string]string{"foo": "bar", "bar": "baz", "baz": "foo"}, []int{1, 2, 3}}),
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
Expand Down

0 comments on commit 583dbf4

Please sign in to comment.