diff --git a/modules/qwarryBidAdapter.js b/modules/qwarryBidAdapter.js index d19ad0b4fe4..7ed5e5c984c 100644 --- a/modules/qwarryBidAdapter.js +++ b/modules/qwarryBidAdapter.js @@ -20,7 +20,8 @@ export const spec = { bids.push({ bidId: bidRequest.bidId, zoneToken: bidRequest.params.zoneToken, - pos: bidRequest.params.pos + pos: bidRequest.params.pos, + sizes: prepareSizes(bidRequest.sizes) }) }) @@ -90,4 +91,8 @@ export const spec = { } } +function prepareSizes(sizes) { + return sizes && sizes.map(size => ({ width: size[0], height: size[1] })); +} + registerBidder(spec); diff --git a/test/spec/modules/qwarryBidAdapter_spec.js b/test/spec/modules/qwarryBidAdapter_spec.js index 5d297d32014..06d4af0756c 100644 --- a/test/spec/modules/qwarryBidAdapter_spec.js +++ b/test/spec/modules/qwarryBidAdapter_spec.js @@ -5,6 +5,7 @@ import { newBidder } from 'src/adapters/bidderFactory.js' const REQUEST = { 'bidId': '456', 'bidder': 'qwarry', + 'sizes': [[100, 200], [300, 400]], 'params': { zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7 @@ -85,7 +86,7 @@ describe('qwarryBidAdapter', function () { expect(bidderRequest.method).to.equal('POST') expect(bidderRequest.data.requestId).to.equal('123') expect(bidderRequest.data.referer).to.equal('http://test.com/path.html') - expect(bidderRequest.data.bids).to.deep.contains({ bidId: '456', zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7 }) + expect(bidderRequest.data.bids).to.deep.contains({ bidId: '456', zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7, sizes: [{ width: 100, height: 200 }, { width: 300, height: 400 }] }) expect(bidderRequest.data.gdprConsent).to.deep.contains({ consentRequired: true, consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A==' }) expect(bidderRequest.options.customHeaders).to.deep.equal({ 'Rtb-Direct': true }) expect(bidderRequest.options.contentType).to.equal('application/json')