diff --git a/modules/gumgumBidAdapter.js b/modules/gumgumBidAdapter.js index a49cd1593d9..fdcbbd8a0f3 100644 --- a/modules/gumgumBidAdapter.js +++ b/modules/gumgumBidAdapter.js @@ -208,7 +208,7 @@ function _getVidParams (attributes) { * @param {Object} bid * @returns {Number} floor */ -function _getFloor (mediaTypes, staticBidfloor, bid) { +function _getFloor (mediaTypes, staticBidFloor, bid) { const curMediaType = Object.keys(mediaTypes)[0] || 'banner'; const bidFloor = { floor: 0, currency: 'USD' }; @@ -220,9 +220,11 @@ function _getFloor (mediaTypes, staticBidfloor, bid) { floor && (bidFloor.floor = floor); currency && (bidFloor.currency = currency); - if (staticBidfloor && floor && currency === 'USD') { - bidFloor.floor = Math.max(staticBidfloor, parseFloat(floor)); + if (staticBidFloor && floor && currency === 'USD') { + bidFloor.floor = Math.max(staticBidFloor, parseFloat(floor)); } + } else if (staticBidFloor) { + bidFloor.floor = staticBidFloor } return bidFloor; diff --git a/test/spec/modules/gumgumBidAdapter_spec.js b/test/spec/modules/gumgumBidAdapter_spec.js index 62988b75fd1..19d3309e3ee 100644 --- a/test/spec/modules/gumgumBidAdapter_spec.js +++ b/test/spec/modules/gumgumBidAdapter_spec.js @@ -196,6 +196,13 @@ describe('gumgumAdapter', function () { expect(bidRequest.gpid).to.equal(123456); }); + it('should set the bid floor if getFloor module is not present but static bid floor is defined', function () { + const req = { ...bidRequests[0], params: { bidfloor: 42 } } + const bidRequest = spec.buildRequests([req])[0]; + expect(bidRequest.data).to.have.property('fp'); + expect(bidRequest.data.fp).to.equal(42); + }); + describe('product id', function () { it('should set the correct pi param if native param is found', function () { const request = { ...bidRequests[0], params: { ...zoneParam, native: 2 } };