File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,27 @@ export const spec = {
151
151
} ,
152
152
153
153
getUserSyncs : function ( syncOptions ) {
154
- return [ ] ;
154
+ const userSyncs = [ ] ;
155
+
156
+ if ( syncOptions . pixelEnabled ) {
157
+ userSyncs . push ( {
158
+ type : 'image' ,
159
+ url : 'https://e.serverbid.com/udb/9969/match?redir=https%3A%2F%2Fmfad.inskinad.com%2Fudb%2F9874%2Fpool%2Fset%2Fi.gif%3FpoolId%3D9969%26poolKey%3D'
160
+ } ) ;
161
+ userSyncs . push ( {
162
+ type : 'image' ,
163
+ url : 'https://ssum.casalemedia.com/usermatchredir?s=185638&cb=https%3A%2F%2Fmfad.inskinad.com%2Fudb%2F9874%2Fsync%2Fi.gif%3FpartnerId%3D1%26userId%3D'
164
+ } ) ;
165
+ }
166
+
167
+ if ( syncOptions . iframeEnabled ) {
168
+ userSyncs . push ( {
169
+ type : 'iframe' ,
170
+ url : 'https://ssum-sec.casalemedia.com/usermatch?s=184665&cb=https%3A%2F%2Fmfad.inskinad.com%2Fudb%2F9874%2Fsync%2Fi.gif%3FpartnerId%3D1%26userId%3D'
171
+ } ) ;
172
+ }
173
+
174
+ return userSyncs ;
155
175
}
156
176
} ;
157
177
Original file line number Diff line number Diff line change @@ -236,18 +236,24 @@ describe('InSkin BidAdapter', () => {
236
236
} ) ;
237
237
} ) ;
238
238
describe ( 'getUserSyncs' , ( ) => {
239
- let syncOptions = { 'iframeEnabled' : true } ;
239
+ let syncOptions = { 'iframeEnabled' : true , 'pixelEnabled' : true } ;
240
240
241
241
it ( 'handles empty sync options' , ( ) => {
242
242
let opts = spec . getUserSyncs ( { } ) ;
243
243
244
244
expect ( opts ) . to . be . empty ;
245
245
} ) ;
246
246
247
- it ( 'should always return empty array ' , ( ) => {
247
+ it ( 'should return a sync url if iframe syncs are enabled ' , ( ) => {
248
248
let opts = spec . getUserSyncs ( syncOptions ) ;
249
249
250
- expect ( opts ) . to . be . empty ;
250
+ expect ( opts . length ) . to . equal ( 1 ) ;
251
+ } ) ;
252
+
253
+ it ( 'should return three sync urls if pixel and iframe syncs are enabled' , ( ) => {
254
+ let opts = spec . getUserSyncs ( syncOptions ) ;
255
+
256
+ expect ( opts . length ) . to . equal ( 3 ) ;
251
257
} ) ;
252
258
} ) ;
253
259
} ) ;
You can’t perform that action at this time.
0 commit comments