Пример #1
0
    it('should return true when gdprApplies equals true and consentString is not present', function () {
      let consentData = {
        consentString: null,
        gdprApplies: true
      };

      expect(spec.isConsentRequired(consentData)).to.be.true;
    });
Пример #2
0
    it('should return true when consentString is present and gdprApplies equals true', function () {
      let consentData = {
        consentString: 'consent-string',
        gdprApplies: true
      };

      expect(spec.isConsentRequired(consentData)).to.be.true;
    });
Пример #3
0
 it('should return false when consentData object is not present', function () {
   expect(spec.isConsentRequired(null)).to.be.false;
 });