@@ -14,7 +14,8 @@ const bidRequests = [
14
14
} ,
15
15
userId : {
16
16
tdid : 'fake-tdid' ,
17
- pubcid : 'fake-pubcid'
17
+ pubcid : 'fake-pubcid' ,
18
+ idl_env : 'fake-identity-link'
18
19
} ,
19
20
crumbs : {
20
21
pubcid : 'fake-pubcid-in-crumbs-obj'
@@ -40,12 +41,32 @@ const bidRequests = [
40
41
iframe : true ,
41
42
iframeSize : [ 500 , 500 ]
42
43
}
43
- }
44
+ } ,
45
+ {
46
+ bidder : 'sharethrough' ,
47
+ bidId : 'bidId4' ,
48
+ sizes : [ [ 700 , 400 ] ] ,
49
+ placementCode : 'bar' ,
50
+ params : {
51
+ pkey : 'dddd4444' ,
52
+ badv : [ 'domain1.com' , 'domain2.com' ]
53
+ }
54
+ } ,
55
+ {
56
+ bidder : 'sharethrough' ,
57
+ bidId : 'bidId5' ,
58
+ sizes : [ [ 700 , 400 ] ] ,
59
+ placementCode : 'bar' ,
60
+ params : {
61
+ pkey : 'eeee5555' ,
62
+ bcat : [ 'IAB1-1' , 'IAB1-2' ]
63
+ }
64
+ } ,
44
65
] ;
45
66
46
67
const prebidRequests = [
47
68
{
48
- method : 'GET ' ,
69
+ method : 'POST ' ,
49
70
url : 'https://btlr.sharethrough.com/WYu2BXv1/v1' ,
50
71
data : {
51
72
bidId : 'bidId' ,
@@ -57,7 +78,7 @@ const prebidRequests = [
57
78
}
58
79
} ,
59
80
{
60
- method : 'GET ' ,
81
+ method : 'POST ' ,
61
82
url : 'https://btlr.sharethrough.com/WYu2BXv1/v1' ,
62
83
data : {
63
84
bidId : 'bidId' ,
@@ -69,7 +90,7 @@ const prebidRequests = [
69
90
}
70
91
} ,
71
92
{
72
- method : 'GET ' ,
93
+ method : 'POST ' ,
73
94
url : 'https://btlr.sharethrough.com/WYu2BXv1/v1' ,
74
95
data : {
75
96
bidId : 'bidId' ,
@@ -82,7 +103,7 @@ const prebidRequests = [
82
103
}
83
104
} ,
84
105
{
85
- method : 'GET ' ,
106
+ method : 'POST ' ,
86
107
url : 'https://btlr.sharethrough.com/WYu2BXv1/v1' ,
87
108
data : {
88
109
bidId : 'bidId' ,
@@ -94,7 +115,7 @@ const prebidRequests = [
94
115
}
95
116
} ,
96
117
{
97
- method : 'GET ' ,
118
+ method : 'POST ' ,
98
119
url : 'https://btlr.sharethrough.com/WYu2BXv1/v1' ,
99
120
data : {
100
121
bidId : 'bidId' ,
@@ -225,7 +246,7 @@ describe('sharethrough adapter spec', function() {
225
246
226
247
expect ( builtBidRequests [ 0 ] . url ) . to . eq ( 'https://btlr.sharethrough.com/WYu2BXv1/v1' ) ;
227
248
expect ( builtBidRequests [ 1 ] . url ) . to . eq ( 'https://btlr.sharethrough.com/WYu2BXv1/v1' ) ;
228
- expect ( builtBidRequests [ 0 ] . method ) . to . eq ( 'GET ' ) ;
249
+ expect ( builtBidRequests [ 0 ] . method ) . to . eq ( 'POST ' ) ;
229
250
} ) ;
230
251
231
252
it ( 'should set the instant_play_capable parameter correctly based on browser userAgent string' , function ( ) {
@@ -315,6 +336,11 @@ describe('sharethrough adapter spec', function() {
315
336
expect ( bidRequest . data . pubcid ) . to . eq ( 'fake-pubcid' ) ;
316
337
} ) ;
317
338
339
+ it ( 'should add the idluid parameter if a bid request contains a value for Identity Link from Live Ramp' , function ( ) {
340
+ const bidRequest = spec . buildRequests ( bidRequests ) [ 0 ] ;
341
+ expect ( bidRequest . data . idluid ) . to . eq ( 'fake-identity-link' ) ;
342
+ } ) ;
343
+
318
344
it ( 'should add Sharethrough specific parameters' , function ( ) {
319
345
const builtBidRequests = spec . buildRequests ( bidRequests ) ;
320
346
expect ( builtBidRequests [ 0 ] ) . to . deep . include ( {
@@ -346,6 +372,18 @@ describe('sharethrough adapter spec', function() {
346
372
expect ( builtBidRequest . data . schain ) . to . eq ( JSON . stringify ( bidRequest . schain ) ) ;
347
373
} ) ;
348
374
375
+ it ( 'should add badv if provided' , ( ) => {
376
+ const builtBidRequest = spec . buildRequests ( [ bidRequests [ 3 ] ] ) [ 0 ] ;
377
+
378
+ expect ( builtBidRequest . data . badv ) . to . have . members ( [ 'domain1.com' , 'domain2.com' ] )
379
+ } ) ;
380
+
381
+ it ( 'should add bcat if provided' , ( ) => {
382
+ const builtBidRequest = spec . buildRequests ( [ bidRequests [ 4 ] ] ) [ 0 ] ;
383
+
384
+ expect ( builtBidRequest . data . bcat ) . to . have . members ( [ 'IAB1-1' , 'IAB1-2' ] )
385
+ } ) ;
386
+
349
387
it ( 'should not add a supply chain parameter if schain is missing' , function ( ) {
350
388
const bidRequest = spec . buildRequests ( bidRequests ) [ 0 ] ;
351
389
expect ( bidRequest . data ) . to . not . include . any . keys ( 'schain' ) ;
0 commit comments