Skip to content

Commit

Permalink
remove bidmanager from rubicon tests (prebid#1671)
Browse files Browse the repository at this point in the history
* remove bidmanager from rubicon tests

* updated rubicon tests to not use callBids

* remove no longer used artifacts from rubiconBidAdapter_spec
  • Loading branch information
snapwich authored and dluxemburg committed Jul 17, 2018
1 parent 70965fa commit e6ff6b0
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 388 deletions.
13 changes: 5 additions & 8 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,20 @@ export const spec = {
},
/**
* @param {*} responseObj
* @param {bidRequest} bidRequest
* @param {BidRequest} bidRequest
* @return {Bid[]} An array of bids which
*/
interpretResponse: function(responseObj, {bidRequest}) {
let ads = responseObj.ads;
const adResponseKey = bidRequest.placementCode;

// check overall response
if (typeof responseObj !== 'object' || responseObj.status !== 'ok') {
return [];
}

// video ads array is wrapped in an object
if (bidRequest.mediaType === 'video' && typeof ads === 'object') {
ads = ads[adResponseKey];
if (typeof bidRequest === 'object' && bidRequest.mediaType === 'video' && typeof ads === 'object') {
ads = ads[bidRequest.placementCode];
}

// check the ad response
Expand All @@ -251,9 +250,9 @@ export const spec = {
// if there are multiple ads, sort by CPM
ads = ads.sort(_adCpmSort);

let bids = ads.reduce((bids, ad) => {
return ads.reduce((bids, ad) => {
if (ad.status !== 'ok') {
return;
return [];
}

let bid = {
Expand Down Expand Up @@ -286,8 +285,6 @@ export const spec = {

return bids;
}, []);

return bids;
},
getUserSyncs: function() {
if (!hasSynced) {
Expand Down
Loading

0 comments on commit e6ff6b0

Please sign in to comment.