Skip to content

Commit

Permalink
Revert "Update the checking rule of bid param for bridgewellBidAdapter (
Browse files Browse the repository at this point in the history
prebid#5736)"

This reverts commit b9f2c1b.
  • Loading branch information
BrightMountainMedia authored Sep 14, 2020
1 parent 10c741d commit 65e6cd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
12 changes: 5 additions & 7 deletions modules/bridgewellBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import find from 'core-js-pure/features/array/find.js';

const BIDDER_CODE = 'bridgewell';
const REQUEST_ENDPOINT = 'https://prebid.scupio.com/recweb/prebid.aspx?cb=' + Math.random();
const BIDDER_VERSION = '0.0.3';
const BIDDER_VERSION = '0.0.2';

export const spec = {
code: BIDDER_CODE,
Expand All @@ -19,13 +19,11 @@ export const spec = {
*/
isBidRequestValid: function (bid) {
let valid = false;
if (bid && bid.params) {
if ((bid.params.cid) && (typeof bid.params.cid === 'number')) {
valid = true;
} else if (bid.params.ChannelID) {
valid = true;
}

if (bid && bid.params && bid.params.ChannelID) {
valid = true;
}

return valid;
},

Expand Down
30 changes: 0 additions & 30 deletions test/spec/modules/bridgewellBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ describe('bridgewellBidAdapter', function () {
expect(spec.isBidRequestValid(validTag)).to.equal(true);
});

it('should return true when required params found', function () {
const validTag = {
'bidder': 'bridgewell',
'params': {
'cid': 1234
},
};
expect(spec.isBidRequestValid(validTag)).to.equal(true);
});

it('should return false when required params not found', function () {
const invalidTag = {
'bidder': 'bridgewell',
Expand All @@ -49,26 +39,6 @@ describe('bridgewellBidAdapter', function () {
};
expect(spec.isBidRequestValid(invalidTag)).to.equal(false);
});

it('should return false when required params are empty', function () {
const invalidTag = {
'bidder': 'bridgewell',
'params': {
'cid': '',
},
};
expect(spec.isBidRequestValid(invalidTag)).to.equal(false);
});

it('should return false when required param cid is not a number', function () {
const invalidTag = {
'bidder': 'bridgewell',
'params': {
'cid': 'bad_cid',
},
};
expect(spec.isBidRequestValid(invalidTag)).to.equal(false);
});
});

describe('buildRequests', function () {
Expand Down

0 comments on commit 65e6cd6

Please sign in to comment.