Skip to content

Commit

Permalink
EX-2588 Return prebid 3 upgrage test in sovrn's tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhalovich committed Sep 15, 2021
1 parent 1fa6e10 commit 54c6a7c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/spec/modules/sovrnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,34 @@ describe('sovrnBidAdapter', function() {
]);
})
})

describe('prebid 3 upgrade', function() {
const bidRequest = {
...baseBidRequest,
'params': {
'tagid': '403370'
},
'mediaTypes': {
'banner': {
'sizes': [
[300, 250],
[300, 600]
]
}
},
};
const request = spec.buildRequests([bidRequest], baseBidderRequest);
const payload = JSON.parse(request.data);

it('gets sizes from mediaTypes.banner', function() {
expect(payload.imp[0].banner.format).to.deep.equal([{w: 300, h: 250}, {w: 300, h: 600}])
expect(payload.imp[0].banner.w).to.equal(1)
expect(payload.imp[0].banner.h).to.equal(1)
})

it('gets correct site info', function() {
expect(payload.site.page).to.equal('http://example.com/page.html');
expect(payload.site.domain).to.equal('example.com');
})
})
})

0 comments on commit 54c6a7c

Please sign in to comment.