1
0
Fork 0

Insensitive case for allow-empty value.

This commit is contained in:
Ludovic Fernandez 2019-04-09 16:50:06 +02:00 committed by Traefiker Bot
parent 2e20394af4
commit ee0e014617
2 changed files with 28 additions and 1 deletions

View file

@ -451,6 +451,33 @@ func TestAddMetadata(t *testing.T) {
},
},
},
{
desc: "level 2, struct with allowEmpty, value true with case variation",
tree: &Node{
Name: "traefik",
Children: []*Node{
{Name: "Foo", Value: "TruE"},
},
},
structure: struct {
Foo struct {
Bar string
} `label:"allowEmpty"`
}{
Foo: struct {
Bar string
}{},
},
expected: expected{
node: &Node{
Name: "traefik",
Kind: reflect.Struct,
Children: []*Node{
{Name: "Foo", FieldName: "Foo", Value: "TruE", Kind: reflect.Struct},
},
},
},
},
{
desc: "level 2, struct with allowEmpty, value false",
tree: &Node{