Skip to content

Commit

Permalink
Add videoCacheKey back to bid response when using spotx as cache serv…
Browse files Browse the repository at this point in the history
…er (#6605)

Co-authored-by: Nick Peceniak <npeceniak@spotx.tv>
  • Loading branch information
npeceniak and Nick Peceniak authored Apr 16, 2021
1 parent de40982 commit 8745d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/spotxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ export const spec = {
} else {
bid.cache_key = spotxBid.ext.cache_key;
bid.vastUrl = 'https://search.spotxchange.com/ad/vast.html?key=' + spotxBid.ext.cache_key
bid.videoCacheKey = spotxBid.ext.cache_key;
}

bid.meta = bid.meta || {};
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/spotxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ describe('the spotx adapter', function () {
expect(responses[0].requestId).to.equal(123);
expect(responses[0].ttl).to.equal(360);
expect(responses[0].vastUrl).to.equal('https://search.spotxchange.com/ad/vast.html?key=cache123');
expect(responses[0].videoCacheKey).to.equal('cache123');
expect(responses[0].width).to.equal(400);
expect(responses[1].cache_key).to.equal('cache124');
expect(responses[1].channel_id).to.equal(12345);
Expand All @@ -508,6 +509,7 @@ describe('the spotx adapter', function () {
expect(responses[1].requestId).to.equal(124);
expect(responses[1].ttl).to.equal(360);
expect(responses[1].vastUrl).to.equal('https://search.spotxchange.com/ad/vast.html?key=cache124');
expect(responses[1].videoCacheKey).to.equal('cache124');
expect(responses[1].width).to.equal(200);
});
});
Expand Down

0 comments on commit 8745d46

Please sign in to comment.