Skip to content

Commit

Permalink
move json number TypeCommaStringSlice test
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Mar 16, 2022
1 parent 6c17d3c commit fb37933
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 fb37933

Please sign in to comment.