Skip to content

Commit

Permalink
originalbid values test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Joyce committed Jul 31, 2018
1 parent ad4a59e commit e5ed84c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions modules/sovrnAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class AuctionData {
/**
* Records the original bid before any adjustments have been made
* @param {*} event - the args object from the auction event
* NOTE: the bid adjustment occurs before the bid response
* the bid adjustment seems to be the bid ready to be adjusted
*/
originalBid(event) {
let bid = this.findBid(event)
Expand Down
5 changes: 3 additions & 2 deletions test/spec/modules/sovrnAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,14 @@ describe('Sovrn Analytics Adapter', function () {
let auctionId = '567.567.567.567';
emitEvent('AUCTION_INIT', auctionInit, auctionId);
emitEvent('BID_REQUESTED', bidRequested, auctionId);
emitEvent('BID_RESPONSE', bidResponse, auctionId);
emitEvent('BID_ADJUSTMENT', bidAdjustment, auctionId);
emitEvent('BID_ADJUSTMENT', bidResponse, auctionId);
emitEvent('BID_RESPONSE', bidAdjustment, auctionId);

let auctionData = sovrnAnalyticsAdapter.getAuctions();
let currentAuction = auctionData[auctionId];
let returnedBid = currentAuction.auction.requests[0].bids[0];
assert.equal(returnedBid.cpm, 0.8);
assert.equal(returnedBid.originalValues.cpm, 0.8584999918937682);
});
});
describe('auction data send ', function() {
Expand Down

0 comments on commit e5ed84c

Please sign in to comment.