@@ -200,46 +200,39 @@ func TestFieldFromString(t *testing.T) {
200200 expectedError bool
201201 }{
202202 {
203- "Body" ,
204- "body" ,
205- Field {BodyField {[]string {}}},
206- false ,
203+ name : "Body" ,
204+ input : "body" ,
205+ output : Field {FieldInterface : BodyField {Keys : []string {}}},
207206 },
208207 {
209- "PrefixedBody" ,
210- "body.test" ,
211- Field {BodyField {[]string {"test" }}},
212- false ,
208+ name : "PrefixedBody" ,
209+ input : "body.test" ,
210+ output : Field {FieldInterface : BodyField {Keys : []string {"test" }}},
213211 },
214212 {
215- "NestedBody" ,
216- "body.test.foo.bar" ,
217- Field {BodyField {[]string {"test" , "foo" , "bar" }}},
218- false ,
213+ name : "NestedBody" ,
214+ input : "body.test.foo.bar" ,
215+ output : Field {FieldInterface : BodyField {Keys : []string {"test" , "foo" , "bar" }}},
219216 },
220217 {
221- "SimpleAttribute" ,
222- "attributes.test" ,
223- Field {AttributeField {[]string {"test" }}},
224- false ,
218+ name : "SimpleAttribute" ,
219+ input : "attributes.test" ,
220+ output : Field {FieldInterface : AttributeField {Keys : []string {"test" }}},
225221 },
226222 {
227- "NestedAttribute" ,
228- "attributes.test.foo.bar" ,
229- Field {AttributeField {[]string {"test" , "foo" , "bar" }}},
230- false ,
223+ name : "NestedAttribute" ,
224+ input : "attributes.test.foo.bar" ,
225+ output : Field {FieldInterface : AttributeField {Keys : []string {"test" , "foo" , "bar" }}},
231226 },
232227 {
233- "SimpleResource" ,
234- "resource.test" ,
235- Field {ResourceField {[]string {"test" }}},
236- false ,
228+ name : "SimpleResource" ,
229+ input : "resource.test" ,
230+ output : Field {ResourceField {Keys : []string {"test" }}},
237231 },
238232 {
239- "NestedResource" ,
240- "resource.test.foo.bar" ,
241- Field {ResourceField {[]string {"test" , "foo" , "bar" }}},
242- false ,
233+ name : "NestedResource" ,
234+ input : "resource.test.foo.bar" ,
235+ output : Field {FieldInterface : ResourceField {Keys : []string {"test" , "foo" , "bar" }}},
243236 },
244237 }
245238
0 commit comments