File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ package visx
2
2
3
3
import (
4
4
"encoding/json"
5
- "github.com/prebid/prebid-server/openrtb_ext"
6
5
"testing"
6
+
7
+ "github.com/prebid/prebid-server/openrtb_ext"
7
8
)
8
9
9
10
func TestValidParams (t * testing.T ) {
@@ -34,6 +35,7 @@ func TestInvalidParams(t *testing.T) {
34
35
35
36
var validParams = []string {
36
37
`{"uid":13245}` ,
38
+ `{"uid":"13245"}` ,
37
39
`{"uid":13245, "size": [10,5]}` ,
38
40
`{"uid":13245, "other_optional": true}` ,
39
41
}
@@ -47,7 +49,10 @@ var invalidParams = []string{
47
49
`2` ,
48
50
`{"size":12345678}` ,
49
51
`{"size":""}` ,
50
- `{"uid": "1"}` ,
52
+ `{"uid": "-1"}` ,
53
+ `{"uid": "232af"}` ,
54
+ `{"uid": "af213"}` ,
55
+ `{"uid": "af"}` ,
51
56
`{"size": true}` ,
52
57
`{"uid": true, "size":"1234567"}` ,
53
58
}
Original file line number Diff line number Diff line change 5
5
"type" : " object" ,
6
6
"properties" : {
7
7
"uid" : {
8
- "type" : " integer" ,
8
+ "type" : [" integer" , " string" ],
9
+ "pattern" : " ^\\ d+$" ,
9
10
"description" : " An ID which identifies this placement of the impression"
10
11
},
11
12
"size" : {
You can’t perform that action at this time.
0 commit comments