@@ -254,6 +254,36 @@ describe('gumgumAdapter', function () {
254
254
expect ( legReq . data . si ) . to . equal ( invalidSlotId ) ;
255
255
} ) ;
256
256
257
+ it ( 'should set the iriscat param when found' , function ( ) {
258
+ const request = { ...bidRequests [ 0 ] , params : { iriscat : 'abc123' } }
259
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
260
+ expect ( bidRequest . data ) . to . have . property ( 'iriscat' ) ;
261
+ } ) ;
262
+
263
+ it ( 'should not set the iriscat param when not found' , function ( ) {
264
+ const request = { ...bidRequests [ 0 ] }
265
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
266
+ expect ( bidRequest . data ) . to . not . have . property ( 'iriscat' ) ;
267
+ } ) ;
268
+
269
+ it ( 'should set the irisid param when found' , function ( ) {
270
+ const request = { ...bidRequests [ 0 ] , params : { irisid : 'abc123' } }
271
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
272
+ expect ( bidRequest . data ) . to . have . property ( 'irisid' ) ;
273
+ } ) ;
274
+
275
+ it ( 'should not set the irisid param when not found' , function ( ) {
276
+ const request = { ...bidRequests [ 0 ] }
277
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
278
+ expect ( bidRequest . data ) . to . not . have . property ( 'irisid' ) ;
279
+ } ) ;
280
+
281
+ it ( 'should not set the irisid param when not of type string' , function ( ) {
282
+ const request = { ...bidRequests [ 0 ] , params : { irisid : 123456 } }
283
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
284
+ expect ( bidRequest . data ) . to . not . have . property ( 'irisid' ) ;
285
+ } ) ;
286
+
257
287
it ( 'should set the global placement id (gpid) if in adserver property' , function ( ) {
258
288
const req = { ...bidRequests [ 0 ] ,
259
289
ortb2Imp : {
@@ -393,6 +423,25 @@ describe('gumgumAdapter', function () {
393
423
expect ( bidRequest . data ) . to . include . any . keys ( 't' ) ;
394
424
expect ( bidRequest . data ) . to . include . any . keys ( 'fp' ) ;
395
425
} ) ;
426
+ it ( 'should set iriscat parameter if iriscat param is found and is of type string' , function ( ) {
427
+ const iriscat = 'segment' ;
428
+ const request = { ...bidRequests [ 0 ] } ;
429
+ request . params = { ...request . params , iriscat } ;
430
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
431
+ expect ( bidRequest . data . iriscat ) . to . equal ( iriscat ) ;
432
+ } ) ;
433
+ it ( 'should not send iriscat parameter if iriscat param is not found' , function ( ) {
434
+ const request = { ...bidRequests [ 0 ] } ;
435
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
436
+ expect ( bidRequest . data . iriscat ) . to . be . undefined ;
437
+ } ) ;
438
+ it ( 'should not send iriscat parameter if iriscat param is not of type string' , function ( ) {
439
+ const iriscat = 123 ;
440
+ const request = { ...bidRequests [ 0 ] } ;
441
+ request . params = { ...request . params , iriscat } ;
442
+ const bidRequest = spec . buildRequests ( [ request ] ) [ 0 ] ;
443
+ expect ( bidRequest . data . iriscat ) . to . be . undefined ;
444
+ } ) ;
396
445
it ( 'should send pubId if inScreenPubID param is specified' , function ( ) {
397
446
const request = Object . assign ( { } , bidRequests [ 0 ] ) ;
398
447
delete request . params ;
0 commit comments