Add new tests for ExtractParameter

This commit regains 100% coverage for ExtractParameter after changes
from commit 688483d.
This commit is contained in:
Cameron Moore 2015-03-20 22:43:39 -05:00
parent 231426da57
commit 943bc258f7

View file

@ -48,6 +48,8 @@ var extractParameterTests = []struct {
{"a.500.b", map[string]interface{}{"a": map[string]interface{}{"b": "z"}}, "", false}, // non-existent slice
{"a.501.b", map[string]interface{}{"a": []interface{}{map[string]interface{}{"b": "y"}, map[string]interface{}{"b": "z"}}}, "", false}, // non-existent slice index
{"a.502.b", map[string]interface{}{"a": []interface{}{}}, "", false}, // non-existent slice index
{"a.b.503", map[string]interface{}{"a": map[string]interface{}{"b": []interface{}{"x", "y", "z"}}}, "", false}, // trailing, non-existent slice index
{"a.b", interface{}("a"), "", false}, // non-map, non-slice input
}
func TestExtractParameter(t *testing.T) {