Insensitive case for allow-empty value.
This commit is contained in:
parent
2e20394af4
commit
ee0e014617
2 changed files with 28 additions and 1 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue