Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid Core: Adding support for a global return of consent metadata. #8043

Merged
merged 5 commits into from
Feb 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions test/spec/modules/consentManagement_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,32 +727,6 @@ describe('consentManagement', function () {
expect(consent.apiVersion).to.equal(2);
});

it('performs lookup check and stores consentData for a valid existing user with additional consent', function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgirardi This should do the trick 🤞

let testConsentData = {
tcString: 'abc12345234',
addtlConsent: 'superduperstring',
gdprApplies: true,
purposeOneTreatment: false,
eventStatus: 'tcloaded'
};
cmpStub = sinon.stub(window, '__tcfapi').callsFake((...args) => {
args[2](testConsentData, true);
});

setConsentConfig(goodConfigWithAllowAuction);

requestBidsHook(() => {
didHookReturn = true;
}, {});
let consent = gdprDataHandler.getConsentData();
sinon.assert.notCalled(utils.logError);
expect(didHookReturn).to.be.true;
expect(consent.consentString).to.equal(testConsentData.tcString);
expect(consent.addtlConsent).to.equal(testConsentData.addtlConsent);
expect(consent.gdprApplies).to.be.true;
expect(consent.apiVersion).to.equal(2);
});

it('throws an error when processCmpData check fails + does not call requestBids callbcack even when allowAuction is true', function () {
let testConsentData = {};
let bidsBackHandlerReturn = false;
Expand Down