Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/prebid/Prebid.js into flo…
Browse files Browse the repository at this point in the history
…c_support_to_prebid_IX_adapter
  • Loading branch information
umakajan committed May 14, 2021
2 parents f3067a3 + 78a00fd commit 973e855
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/videoCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function toStorageRequest(bid) {
if (config.getConfig('cache.vasttrack')) {
payload.bidder = bid.bidder;
payload.bidid = bid.requestId;
payload.aid = bid.auctionId;
// function has a thisArg set to bidderRequest for accessing the auctionStart
if (utils.isPlainObject(this) && this.hasOwnProperty('auctionStart')) {
payload.timestamp = this.auctionStart;
Expand Down
16 changes: 12 additions & 4 deletions test/spec/videoCache_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,15 @@ describe('The video cache', function () {
ttl: 25,
customCacheKey: customKey1,
requestId: '12345abc',
bidder: 'appnexus'
bidder: 'appnexus',
auctionId: '1234-56789-abcde'
}, {
vastXml: vastXml2,
ttl: 25,
customCacheKey: customKey2,
requestId: 'cba54321',
bidder: 'rubicon'
bidder: 'rubicon',
auctionId: '1234-56789-abcde'
}];

store(bids, function () { });
Expand All @@ -222,13 +224,15 @@ describe('The video cache', function () {
ttlseconds: 25,
key: customKey1,
bidid: '12345abc',
aid: '1234-56789-abcde',
bidder: 'appnexus'
}, {
type: 'xml',
value: vastXml2,
ttlseconds: 25,
key: customKey2,
bidid: 'cba54321',
aid: '1234-56789-abcde',
bidder: 'rubicon'
}]
};
Expand All @@ -254,13 +258,15 @@ describe('The video cache', function () {
ttl: 25,
customCacheKey: customKey1,
requestId: '12345abc',
bidder: 'appnexus'
bidder: 'appnexus',
auctionId: '1234-56789-abcde'
}, {
vastXml: vastXml2,
ttl: 25,
customCacheKey: customKey2,
requestId: 'cba54321',
bidder: 'rubicon'
bidder: 'rubicon',
auctionId: '1234-56789-abcde'
}];

store(bids, function () { }, getMockBidRequest());
Expand All @@ -276,6 +282,7 @@ describe('The video cache', function () {
key: customKey1,
bidid: '12345abc',
bidder: 'appnexus',
aid: '1234-56789-abcde',
timestamp: 1510852447530
}, {
type: 'xml',
Expand All @@ -284,6 +291,7 @@ describe('The video cache', function () {
key: customKey2,
bidid: 'cba54321',
bidder: 'rubicon',
aid: '1234-56789-abcde',
timestamp: 1510852447530
}]
};
Expand Down

0 comments on commit 973e855

Please sign in to comment.