Skip to content

Commit

Permalink
Remove switch from one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Samylkin committed Jan 11, 2017
1 parent c1d2c37 commit 2bad701
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions config/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,8 @@ func TestMapParsing(t *testing.T) {
assert.True(t, ok)

for key, val := range p {
switch key := key.(type) {
case string:
assert.Equal(t, "makeway", key)
assert.Equal(t, "notanoption", val)
}
assert.Equal(t, "makeway", key)
assert.Equal(t, "notanoption", val)
}

assert.Equal(t, "nesteddata", ms.NestedStruct.AdditionalData)
Expand Down Expand Up @@ -264,7 +261,6 @@ func TestMergeUnmarshaller(t *testing.T) {

ms := mapStruct{}
assert.NoError(t, provider.Get("mapStruct").PopulateStruct(&ms))

assert.NotNil(t, ms.MyMap)
assert.NotZero(t, len(ms.MyMap))

Expand All @@ -278,7 +274,6 @@ func TestMergeUnmarshaller(t *testing.T) {
s, ok := ms.MyMap["pools"].([]interface{})
assert.True(t, ok)
assert.Equal(t, []interface{}{"very", "funny"}, s)

assert.Equal(t, "", ms.NestedStruct.AdditionalData)
}

Expand Down

0 comments on commit 2bad701

Please sign in to comment.