helper/schema: more tests

This commit is contained in:
Mitchell Hashimoto 2015-01-10 11:49:37 -08:00
parent e77b2b17c4
commit f64b09a045

View File

@ -167,6 +167,21 @@ func TestMapFieldWriter(t *testing.T) {
true,
map[string]string{},
},
"full object": {
nil,
map[string]interface{}{
"string": "foo",
"list": []interface{}{"foo", "bar"},
},
false,
map[string]string{
"string": "foo",
"list.#": "2",
"list.0": "foo",
"list.1": "bar",
},
},
}
for name, tc := range cases {