Skip to content

Commit

Permalink
PBJS Core: canBidderRegisterSync ignoring iframe sync disabled by def…
Browse files Browse the repository at this point in the history
…ault (prebid#6535)

* Update eids.js

* Update eids_spec.js

* Update eids.js

* Update pubmaticBidAdapter_spec.js

* Update eids.js

* Update eids_spec.js

* Update conversantBidAdapter_spec.js

* Update rubiconBidAdapter_spec.js

* Update conversantBidAdapter_spec.js

* Delete test/spec/adapters directory

* Update userId_spec.js

* Update userSync.js

* Update userSync_spec.js
  • Loading branch information
patmmccann authored and stsepelin committed May 28, 2021
1 parent 8d1add6 commit 9d42d51
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/userSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function newUserSync(userSyncDependencies) {
}
return checkForFiltering[filterType](biddersToFilter, bidder);
}
return false;
return !permittedPixels[type];
}

/**
Expand Down
18 changes: 18 additions & 0 deletions test/spec/userSync_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,24 @@ describe('user sync', function () {
});
expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false);
});
it('should return false for iframe if there is no iframe filterSettings', function () {
const userSync = newUserSync({
config: {
syncEnabled: true,
filterSettings: {
image: {
bidders: '*',
filter: 'include'
}
},
syncsPerBidder: 5,
syncDelay: 3000,
auctionDelay: 0
}
});

expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false);
});
it('should return true if filter settings does allow it', function () {
const userSync = newUserSync({
config: {
Expand Down

0 comments on commit 9d42d51

Please sign in to comment.