@@ -559,6 +559,32 @@ describe('DistrictM Adaptor', function () {
559
559
} ) ;
560
560
} ) ;
561
561
562
+ describe ( `check validation for id sync gdpr ccpa` , ( ) => {
563
+ let allin = spec . getUserSyncs ( { iframeEnabled : true } , { } , bidderRequest . gdprConsent , bidderRequest . uspConsent ) [ 0 ]
564
+ let noCCPA = spec . getUserSyncs ( { iframeEnabled : true } , { } , bidderRequest . gdprConsent , null ) [ 0 ]
565
+ let noGDPR = spec . getUserSyncs ( { iframeEnabled : true } , { } , null , bidderRequest . uspConsent ) [ 0 ]
566
+ let nothing = spec . getUserSyncs ( { iframeEnabled : true } , { } , null , null ) [ 0 ]
567
+
568
+ /*
569
+
570
+ 'uspConsent': '1NY',
571
+ 'gdprConsent': {
572
+ 'consentString': 'BOPqNzUOPqNzUAHABBAAA5AAAAAAAA',
573
+ */
574
+ it ( `gdpr & ccpa should be present` , ( ) => {
575
+ expect ( allin . url ) . to . be . equal ( 'https://cdn.districtm.io/ids/index.html?gdpr=BOPqNzUOPqNzUAHABBAAA5AAAAAAAA&ccpa=1NY' )
576
+ } )
577
+ it ( `ccpa should be present` , ( ) => {
578
+ expect ( noGDPR . url ) . to . be . equal ( 'https://cdn.districtm.io/ids/index.html?ccpa=1NY' )
579
+ } )
580
+ it ( `gdpr should be present` , ( ) => {
581
+ expect ( noCCPA . url ) . to . be . equal ( 'https://cdn.districtm.io/ids/index.html?gdpr=BOPqNzUOPqNzUAHABBAAA5AAAAAAAA' )
582
+ } )
583
+ it ( `gdpr & ccpa shouldn't be present` , ( ) => {
584
+ expect ( nothing . url ) . to . be . equal ( 'https://cdn.districtm.io/ids/index.html' )
585
+ } )
586
+ } )
587
+
562
588
describe ( `Helper function testing` , function ( ) {
563
589
const bid = matchRequest ( '29a28a1bbc8a8d' , { bidderRequest} ) ;
564
590
const { width, height} = defaultSize ( bid ) ;
0 commit comments