Skip to content

Commit

Permalink
backport of commit fb37933
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Mar 28, 2022
1 parent 192e23c commit 367ff8a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions sdk/framework/field_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,18 @@ func TestFieldDataGet(t *testing.T) {
false,
},

"comma string slice type, single JSON number value": {
map[string]*FieldSchema{
"foo": {Type: TypeCommaStringSlice},
},
map[string]interface{}{
"foo": json.Number("123"),
},
"foo",
[]string{"123"},
false,
},

"type kv pair, not supplied": {
map[string]*FieldSchema{
"foo": {Type: TypeKVPairs},
Expand Down Expand Up @@ -1085,16 +1097,6 @@ func TestFieldDataGet_Error(t *testing.T) {
},
"foo",
},

"comma string slice type, single JSON number value": {
map[string]*FieldSchema{
"foo": {Type: TypeCommaStringSlice},
},
map[string]interface{}{
"foo": json.Number("123"),
},
"foo",
},
}

for name, tc := range cases {
Expand Down

0 comments on commit 367ff8a

Please sign in to comment.