Skip to content

Commit

Permalink
add TypeCommaStringSlice for json.Number
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Mar 16, 2022
1 parent 783dca4 commit 4431f86
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sdk/framework/field_data_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package framework

import (
"encoding/json"
"net/http"
"reflect"
"testing"
Expand Down Expand Up @@ -1084,6 +1085,16 @@ 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 4431f86

Please sign in to comment.