helper/config: tests

This commit is contained in:
Mitchell Hashimoto 2015-06-30 10:44:56 -07:00
parent fd2d44c212
commit ac444accb1
1 changed files with 30 additions and 0 deletions

View File

@ -74,6 +74,36 @@ func TestDecode(t *testing.T) {
},
},
},
"build name": {
[]interface{}{
map[string]interface{}{
"name": "{{build_name}}",
},
map[string]interface{}{
"packer_build_name": "foo",
},
},
&Target{
Name: "foo",
},
nil,
},
"build type": {
[]interface{}{
map[string]interface{}{
"name": "{{build_type}}",
},
map[string]interface{}{
"packer_builder_type": "foo",
},
},
&Target{
Name: "foo",
},
nil,
},
}
for k, tc := range cases {