validate missing frame from input data

This commit is contained in:
Michael Baird 2017-06-29 10:13:47 -05:00
parent 681c48fd12
commit a80be54a60

View file

@ -1389,6 +1389,16 @@ var defaultBody = `
"frame":"distance-miles",
"valueDestination":"value-to-row"
}
]
},
{
"name":"noFrame",
"actions":[
{
"frame":"foo",
"valueDestination":"value-to-row"
}
]
}
@ -1509,6 +1519,20 @@ func TestInput_JSON(t *testing.T) {
"withPet": true
}]`,
err: "columnLabel required"},
{json: `[{
"id": 1,
"cabType": "yellow",
"distanceMiles": 8,
"withPet": true
}`,
err: "unexpected EOF"},
{json: `[{
"id": 1,
"cabType": "yellow",
"distanceMiles": 8,
"noFrame": 1
}]`,
err: "Frame not found: foo"},
}
h := NewHandler()
h.Holder = hldr.Holder