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

Rubicon Video COPPA fix #4155

Merged
merged 2 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export const spec = {
}

if (config.getConfig('coppa') === true) {
utils.deepSetValue(request, 'regs.coppa', 1);
utils.deepSetValue(data, 'regs.coppa', 1);
}

return {
Expand Down
18 changes: 18 additions & 0 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,24 @@ describe('the rubicon adapter', function () {
expect(requests.length).to.equal(1);
expect(requests[0].url).to.equal(FASTLANE_ENDPOINT);
});

it('should include coppa flag in video bid request', () => {
createVideoBidderRequest();

sandbox.stub(Date, 'now').callsFake(() =>
bidderRequest.auctionStart + 100
);

sandbox.stub(config, 'getConfig').callsFake(key => {
const config = {
'coppa': true
};
return config[key];
});

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.regs.coppa).to.equal(1);
});
});

describe('combineSlotUrlParams', function () {
Expand Down