Skip to content

Commit

Permalink
Sovrn Bid Adapter: Add test to verify presence of ORTB2 device data i…
Browse files Browse the repository at this point in the history
…n request
  • Loading branch information
BohdanVV committed Jun 10, 2024
1 parent 44b765c commit d2cfd69
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/spec/modules/sovrnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,31 @@ describe('sovrnBidAdapter', function() {
expect(regs.gpp_sid).to.include(8)
})

it('should add ORTB2 device data to the request', function () {
const bidderRequest = {
...baseBidderRequest,
ortb2: {
device: {
w: 980,
h: 1720,
dnt: 0,
ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1',
language: 'en',
devicetype: 1,
make: 'Apple',
model: 'iPhone 12 Pro Max',
os: 'iOS',
osv: '17.4',
},
},
};

const request = spec.buildRequests([baseBidRequest], bidderRequest);
const payload = JSON.parse(request.data);

expect(payload.device).to.deep.equal(bidderRequest.ortb2.device);
});

it('should not send gpp info when gppConsent is not defined', function () {
const bidderRequest = {
...baseBidderRequest,
Expand Down

0 comments on commit d2cfd69

Please sign in to comment.