opentofu/flatmap/map_test.go
2014-07-09 15:26:47 -07:00

25 lines
369 B
Go

package flatmap
import (
"reflect"
"testing"
)
func TestMapDelete(t *testing.T) {
m := Flatten(map[string]interface{}{
"foo": "bar",
"routes": []map[string]string{
map[string]string{
"foo": "bar",
},
},
})
m.Delete("routes")
expected := Map(map[string]string{"foo": "bar"})
if !reflect.DeepEqual(m, expected) {
t.Fatalf("bad: %#v", m)
}
}