From 2cd6e2746e41ac3ce03387cd7d6fd514faaee967 Mon Sep 17 00:00:00 2001 From: Matt Kendall <1870166+mkendall07@users.noreply.github.com> Date: Tue, 24 Jul 2018 11:30:59 -0400 Subject: [PATCH] Revert "don't allow null or undefined bid properties" (#2886) * Revert "New Adapter ZEDO (#2872)" This reverts commit 8eedfc3ce90b678c3c05869019567e371154da72. * Revert "don't allow null or undefined bid properties (#2865)" This reverts commit f5170d9d173b0c11a431fa172e26e565273a409a. --- src/adapters/bidderFactory.js | 2 +- test/spec/unit/core/bidderFactory_spec.js | 30 ----------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/adapters/bidderFactory.js b/src/adapters/bidderFactory.js index 8e359d982590..d8b55f94f9c8 100644 --- a/src/adapters/bidderFactory.js +++ b/src/adapters/bidderFactory.js @@ -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) { diff --git a/test/spec/unit/core/bidderFactory_spec.js b/test/spec/unit/core/bidderFactory_spec.js index d1422cb1496e..ca2a9afc1035 100644 --- a/test/spec/unit/core/bidderFactory_spec.js +++ b/test/spec/unit/core/bidderFactory_spec.js @@ -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', () => {