Skip to content

Commit

Permalink
update aardvark to not return zero bids (#2651)
Browse files Browse the repository at this point in the history
* update aardvark to not return zero bids

* update test for aardvarkBidAdapter
  • Loading branch information
dejanstrbac authored and jaiminpanchal27 committed Jun 1, 2018
1 parent 6e7b324 commit 6f0a2db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion modules/aardvarkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ export const spec = {
}

utils._each(serverResponse.body, function(rawBid) {
var cpm = +(rawBid.cpm || 0);

if (!cpm) {
return;
}

var bidResponse = {
requestId: rawBid.cid,
cpm: rawBid.cpm || 0,
cpm: cpm,
width: rawBid.width || 0,
height: rawBid.height || 0,
currency: rawBid.currency ? rawBid.currency : AARDVARK_CURRENCY,
Expand Down
3 changes: 1 addition & 2 deletions test/spec/modules/aardvarkBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ describe('aardvarkAdapterTest', () => {
}];

var result = spec.interpretResponse({ body: emptyResponse }, {});
expect(result.length).to.equal(1);
expect(result[0].cpm).to.equal(0.0);
expect(result.length).to.equal(0);
});
});
});

0 comments on commit 6f0a2db

Please sign in to comment.