Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nandor Kracser <bonifaido@gmail.com>
  • Loading branch information
bonifaido committed May 6, 2020
1 parent c76ad0d commit 39194a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mapstructure_test.go
Expand Up @@ -160,6 +160,8 @@ type StructWithOmitEmpty struct {
OmitMapField map[string]interface{} `mapstructure:"omittable-map,omitempty"`
NestedField *Nested `mapstructure:"visible-nested"`
OmitNestedField *Nested `mapstructure:"omittable-nested,omitempty"`
}

type Required struct {
RequiredBar string `mapstructure:"bar,required"`
Value string `mapstructure:"foo"`
Expand Down Expand Up @@ -2233,6 +2235,9 @@ func TestDecode_StructTaggedWithOmitempty_KeepNonEmptyValues(t *testing.T) {

if !reflect.DeepEqual(actual, expected) {
t.Fatalf("Decode() expected: %#v, got: %#v", expected, actual)
}
}

func TestRequired(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 39194a0

Please sign in to comment.