Beispiel #1
0
    it('should return user syncs if pixels are present in the response', function () {
      let userSyncs = spec.getUserSyncs({}, serverResponses);

      expect(userSyncs).to.deep.equal([
        {type: 'image', url: 'img.org'},
        {type: 'iframe', url: 'pixels1.org'}
      ]);
    });
    it('should not return user syncs if it has already been returned', () => {
      $$PREBID_GLOBAL$$.aolGlobals.pixelsDropped = true;

      let userSyncs = spec.getUserSyncs({}, [bidResponse], bidRequest);

      expect($$PREBID_GLOBAL$$.aolGlobals.pixelsDropped).to.be.true;
      expect(userSyncs).to.deep.equal([]);
    });
    it('should not return user syncs if pixels are not present', () => {
      bidResponse.ext.pixels = null;

      let userSyncs = spec.getUserSyncs({}, [bidResponse], bidRequest);

      expect($$PREBID_GLOBAL$$.aolGlobals.pixelsDropped).to.be.false;
      expect(userSyncs).to.deep.equal([]);
    });
    it('should return user syncs only if userSyncOn equals to "bidResponse"', () => {
      let userSyncs = spec.getUserSyncs({}, [bidResponse], bidRequest);

      expect($$PREBID_GLOBAL$$.aolGlobals.pixelsDropped).to.be.true;
      expect(userSyncs).to.deep.equal([
        {type: 'image', url: 'img.org'},
        {type: 'iframe', url: 'pixels1.org'}
      ]);
    });
Beispiel #5
0
    it('should not return user syncs if pixels are not present', function () {
      bidResponse.ext.pixels = null;
      let userSyncs = spec.getUserSyncs({}, serverResponses);

      expect(userSyncs).to.deep.equal([]);
    });