Skip to content

Commit

Permalink
GumGum adapter: push first indexed value in sizes array to bidRespons…
Browse files Browse the repository at this point in the history
…es.height and width (#4006)

* changed resizing unit tests to return the first size dimensions in the sizes array

* added some changes
  • Loading branch information
WayneYang1 authored and bretg committed Aug 7, 2019
1 parent d7ebb57 commit 131c56a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function buildRequests (validBidRequests, bidderRequest) {
tId: transactionId,
pi: data.pi,
selector: params.selector,
sizes: bidRequest.sizes,
sizes: bidRequest.sizes || bidRequest.mediatype[banner].sizes,
url: BID_ENDPOINT,
method: 'GET',
data: Object.assign(data, _getBrowserParams(), _getDigiTrustQueryParams(), _getTradeDeskIDParam(bidRequest))
Expand Down Expand Up @@ -221,7 +221,7 @@ function interpretResponse (serverResponse, bidRequest) {
let [width, height] = sizes[0].split('x')

// return 1x1 when breakout expected
if ((product === 2 || product === 5) && includes(sizes, '1x1')) {
if (product === 5 && includes(sizes, '1x1')) {
width = '1'
height = '1'
}
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ describe('gumgumAdapter', function () {
'thms': 10000
}
let result = spec.interpretResponse({ body: inscreenServerResponse }, inscreenBidRequest);
expect(result[0].width).to.equal('1');
expect(result[0].height).to.equal('1');
expect(result[0].width).to.equal(inscreenBidRequest.sizes[0][0].toString());
expect(result[0].height).to.equal(inscreenBidRequest.sizes[0][1].toString());
})
})
describe('getUserSyncs', function () {
Expand Down

0 comments on commit 131c56a

Please sign in to comment.