Beispiel #1
0
 it('should return formatted gdpr params when isConsentRequired returns true', function () {
   let consentData = {
     consentString: 'test-consent'
   };
   consentRequiredStub.returns(true);
   expect(spec.formatOneMobileDynamicParams({}, consentData)).to.be.equal('&gdpr=1&euconsent=test-consent');
 });
Beispiel #2
0
 it('should return formatted params when params are present', function () {
   let params = {
     param1: 'val1',
     param2: 'val2',
     param3: 'val3'
   };
   expect(spec.formatOneMobileDynamicParams(params)).to.contain('&param1=val1&param2=val2&param3=val3');
 });
Beispiel #3
0
 it('should return formatted secure param when isSecureProtocol returns true', function () {
   secureProtocolStub.returns(true);
   expect(spec.formatOneMobileDynamicParams()).to.be.equal('&secure=1');
 });
Beispiel #4
0
 it('should return empty string when params are not present', function () {
   expect(spec.formatOneMobileDynamicParams()).to.be.equal('');
 });