Skip to content

Commit

Permalink
orbidderBidAdapter: add unit test for price floor module (prebid#8044)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikiseke1979 committed Feb 22, 2022
1 parent 3819961 commit 9c0975a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/spec/modules/orbidderBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,27 @@ describe('orbidderBidAdapter', () => {
});
});

describe('buildRequests with price floor module', () => {
const bidRequest = deepClone(defaultBidRequestBanner);
bidRequest.params.bidfloor = 1;
bidRequest.getFloor = (floorObj) => {
return {
floor: bidRequest.floors.values['banner|640x480'],
currency: floorObj.currency,
mediaType: floorObj.mediaType
}
};

bidRequest.floors = {
currency: 'EUR',
values: {
'banner|640x480': 15.07
}
};
const request = buildRequest(bidRequest);
expect(request.data.params.bidfloor).to.equal(15.07);
});

describe('interpretResponse', () => {
it('banner: should get correct bid response', () => {
const serverResponse = [
Expand Down

0 comments on commit 9c0975a

Please sign in to comment.