Skip to content

Commit

Permalink
Revert "don't allow null or undefined bid properties" (prebid#2886)
Browse files Browse the repository at this point in the history
* Revert "New Adapter ZEDO (prebid#2872)"

This reverts commit 8eedfc3.

* Revert "don't allow null or undefined bid properties (prebid#2865)"

This reverts commit f5170d9.
  • Loading branch information
mkendall07 authored and florevallatmrf committed Sep 6, 2018
1 parent 1e97144 commit 2cd6e27
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion src/adapters/bidderFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function validBidSize(adUnitCode, bid, bidRequests) {
export function isValid(adUnitCode, bid, bidRequests) {
function hasValidKeys() {
let bidKeys = Object.keys(bid);
return COMMON_BID_RESPONSE_KEYS.every(key => includes(bidKeys, key) && !includes([undefined, null], bid[key]));
return COMMON_BID_RESPONSE_KEYS.every(key => includes(bidKeys, key));
}

function errorMessage(msg) {
Expand Down
30 changes: 0 additions & 30 deletions test/spec/unit/core/bidderFactory_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,36 +427,6 @@ describe('bidders created by newBidder', () => {

expect(logErrorSpy.calledOnce).to.equal(true);
});

it('should logError when required bid response params are undefined', () => {
const bidder = newBidder(spec);

const bid = {
'ad': 'creative',
'cpm': '1.99',
'width': 300,
'height': 250,
'requestId': '1',
'creativeId': 'some-id',
'currency': undefined,
'netRevenue': true,
'ttl': 360
};

spec.isBidRequestValid.returns(true);
spec.buildRequests.returns({
method: 'POST',
url: 'test.url.com',
data: {}
});
spec.getUserSyncs.returns([]);

spec.interpretResponse.returns(bid);

bidder.callBids(MOCK_BIDS_REQUEST, addBidResponseStub, doneStub, ajaxStub);

expect(logErrorSpy.calledOnce).to.equal(true);
});
});

describe('when the ajax call fails', () => {
Expand Down

0 comments on commit 2cd6e27

Please sign in to comment.