Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pbadslot phase2 #5525

Merged
merged 79 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
8d635ff
Add microadBidAdapter
Feb 15, 2019
3055b90
Remove unnecessary encodeURIComponent from microadBidAdapter
Feb 26, 2019
67fb91b
Submit Advangelists Prebid Adapter
Feb 26, 2019
3ebb916
Submit Advangelists Prebid Adapter 1.1
Feb 27, 2019
4f5c451
Correct procudtion endpoint for prebid
Feb 28, 2019
2dc6d1d
Merge branch 'microad-bid-adapter' of git://github.com/strong-zero/Pr…
Feb 28, 2019
fa3e081
Merge remote-tracking branch 'origin/master' into master-rubicon-clean
Mar 18, 2019
600a46e
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Mar 18, 2019
7f578b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 23, 2019
176a312
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 26, 2019
9abf89c
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2019
6ce04ab
Merge remote-tracking branch 'upstream/master'
Jun 10, 2019
415e2f6
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jun 27, 2019
61fb82c
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 11, 2019
3cc4c67
analytics update with wrapper name
Jul 11, 2019
cd81e02
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
e2b4e04
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
53b5970
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
5c00ed5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 16, 2019
28848ad
reverted error merge
Jul 16, 2019
ab635ee
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 19, 2019
93308f5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 24, 2019
1cfd52d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 25, 2019
d619807
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 27, 2019
9893f0f
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
986a251
Merge remote-tracking branch 'upstream/master'
Aug 23, 2019
2cae7c0
Merge branch 'master' of https://github.com/prebid/Prebid.js into ori…
Aug 27, 2019
d7fd252
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 4, 2019
c7c01ba
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
24a28aa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
7a1a4ec
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Sep 25, 2019
4173d16
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 25, 2019
ca13952
update changed default value of netRevenue to true
Sep 27, 2019
0b6cd48
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
5f0110d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
f930a34
Merge remote-tracking branch 'upstream/master'
Oct 8, 2019
9bff282
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 14, 2019
712ec9e
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
f192f65
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
006f53c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
0341150
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 31, 2019
fa59897
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 15, 2019
dcff2cf
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 20, 2019
0222ce2
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 24, 2019
227beca
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 25, 2019
dc3ee49
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Dec 4, 2019
9a5a08d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 4, 2019
35ea5d4
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 6, 2019
f89b71c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 17, 2019
4e1679b
Re-add rubicon analytics without deprecated getTopWindowUrl util
Dec 17, 2019
fd80acd
Cache referrer on auction_init instead of bid_requested
Dec 17, 2019
2ab26a3
Merge pull request #51 from rubicon-project/rubicon-analytics-3.0
msm0504 Dec 17, 2019
7de7ca6
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Jan 9, 2020
5f1fe06
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 9, 2020
60b5ad8
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 17, 2020
5f44edd
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Feb 10, 2020
4809354
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 10, 2020
8d8bdff
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 13, 2020
a1a2318
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 19, 2020
ac2ac12
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 24, 2020
5ce8787
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Mar 12, 2020
6c2bdec
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 12, 2020
a54a491
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 27, 2020
889178d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 27, 2020
40cba46
Merge branch 'master' of https://github.com/prebid/Prebid.js
Apr 4, 2020
cc5d929
Merge remote-tracking branch 'remote/master'
Apr 23, 2020
5574a52
merged remote master changes
Apr 24, 2020
ba62245
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 1, 2020
1fe62f9
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 5, 2020
a4d1d62
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2020
7215461
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 20, 2020
258c555
Merge remote-tracking branch 'origin/master'
May 20, 2020
a921ac9
Merge remote-tracking branch 'remotes/remote/master'
Jun 3, 2020
90975d1
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jun 5, 2020
aac67fa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jun 18, 2020
585993c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 8, 2020
20f5825
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 16, 2020
fd4ab00
Send both pbAdSlot and GAM ad unit if in FPD
Jul 21, 2020
d8998e9
Merge branch 'master' of https://github.com/prebid/Prebid.js into pba…
Jul 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,16 @@ const OPEN_RTB_PROTOCOL = {
*/
const pbAdSlot = utils.deepAccess(adUnit, 'fpd.context.pbAdSlot');
if (typeof pbAdSlot === 'string' && pbAdSlot) {
utils.deepSetValue(imp, 'ext.context.data.adslot', pbAdSlot);
utils.deepSetValue(imp, 'ext.context.data.pbadslot', pbAdSlot);
}

/**
* GAM Ad Unit
* @type {(string|undefined)}
*/
const gamAdUnit = utils.deepAccess(adUnit, 'fpd.context.adServer.adSlot');
if (typeof gamAdUnit === 'string' && gamAdUnit) {
utils.deepSetValue(imp, 'ext.context.data.adslot', gamAdUnit);
}

Object.assign(imp, mediaTypes);
Expand Down
22 changes: 20 additions & 2 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,16 @@ export const spec = {
*/
const pbAdSlot = utils.deepAccess(bidRequest, 'fpd.context.pbAdSlot');
if (typeof pbAdSlot === 'string' && pbAdSlot) {
utils.deepSetValue(data.imp[0].ext, 'context.data.adslot', pbAdSlot);
utils.deepSetValue(data.imp[0].ext, 'context.data.pbadslot', pbAdSlot);
}

/**
* GAM Ad Unit
* @type {(string|undefined)}
*/
const gamAdUnit = utils.deepAccess(bidRequest, 'fpd.context.adServer.adSlot');
if (typeof gamAdUnit === 'string' && gamAdUnit) {
utils.deepSetValue(data.imp[0].ext, 'context.data.adslot', gamAdUnit);
}

// if storedAuctionResponse has been set, pass SRID
Expand Down Expand Up @@ -593,7 +602,16 @@ export const spec = {
*/
const pbAdSlot = utils.deepAccess(bidRequest, 'fpd.context.pbAdSlot');
if (typeof pbAdSlot === 'string' && pbAdSlot) {
data['tg_i.dfp_ad_unit_code'] = pbAdSlot.replace(/^\/+/, '');
data['tg_i.pbadslot'] = pbAdSlot.replace(/^\/+/, '');
}

/**
* GAM Ad Unit
* @type {(string|undefined)}
*/
const gamAdUnit = utils.deepAccess(bidRequest, 'fpd.context.adServer.adSlot');
if (typeof gamAdUnit === 'string' && gamAdUnit) {
data['tg_i.dfp_ad_unit_code'] = gamAdUnit.replace(/^\/+/, '');
}

// digitrust properties
Expand Down
88 changes: 83 additions & 5 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,80 @@ describe('S2S Adapter', function () {
});

describe('pbAdSlot config', function () {
it('should not send \"imp.ext.context.data.pbadslot\" if \"fpd.context\" is undefined', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);

adapter.callBids(bidRequest, BID_REQUESTS, addBidResponse, done, ajax);
const parsedRequestBody = JSON.parse(server.requests[0].requestBody);

expect(parsedRequestBody.imp).to.be.a('array');
expect(parsedRequestBody.imp[0]).to.be.a('object');
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.pbadslot');
});

it('should not send \"imp.ext.context.data.pbadslot\" if \"fpd.context.pbAdSlot\" is undefined', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);
bidRequest.ad_units[0].fpd = {};

adapter.callBids(bidRequest, BID_REQUESTS, addBidResponse, done, ajax);
const parsedRequestBody = JSON.parse(server.requests[0].requestBody);

expect(parsedRequestBody.imp).to.be.a('array');
expect(parsedRequestBody.imp[0]).to.be.a('object');
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.pbadslot');
});

it('should not send \"imp.ext.context.data.pbadslot\" if \"fpd.context.pbAdSlot\" is empty string', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);
bidRequest.ad_units[0].fpd = {
context: {
pbAdSlot: ''
}
};

adapter.callBids(bidRequest, BID_REQUESTS, addBidResponse, done, ajax);
const parsedRequestBody = JSON.parse(server.requests[0].requestBody);

expect(parsedRequestBody.imp).to.be.a('array');
expect(parsedRequestBody.imp[0]).to.be.a('object');
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.pbadslot');
});

it('should send \"imp.ext.context.data.pbadslot\" if \"fpd.context.pbAdSlot\" value is a non-empty string', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);
bidRequest.ad_units[0].fpd = {
context: {
pbAdSlot: '/a/b/c'
}
};

adapter.callBids(bidRequest, BID_REQUESTS, addBidResponse, done, ajax);
const parsedRequestBody = JSON.parse(server.requests[0].requestBody);

expect(parsedRequestBody.imp).to.be.a('array');
expect(parsedRequestBody.imp[0]).to.be.a('object');
expect(parsedRequestBody.imp[0]).to.have.deep.nested.property('ext.context.data.pbadslot');
expect(parsedRequestBody.imp[0].ext.context.data.pbadslot).to.equal('/a/b/c');
});
});

describe('GAM ad unit config', function () {
it('should not send \"imp.ext.context.data.adslot\" if \"fpd.context\" is undefined', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
Expand All @@ -1460,7 +1534,7 @@ describe('S2S Adapter', function () {
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.adslot');
});

it('should not send \"imp.ext.context.data.adslot\" if \"fpd.context.pbAdSlot\" is undefined', function () {
it('should not send \"imp.ext.context.data.adslot\" if \"fpd.context.adServer.adSlot\" is undefined', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
Expand All @@ -1476,15 +1550,17 @@ describe('S2S Adapter', function () {
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.adslot');
});

it('should not send \"imp.ext.context.data.adslot\" if \"fpd.context.pbAdSlot\" is empty string', function () {
it('should not send \"imp.ext.context.data.adslot\" if \"fpd.context.adServer.adSlot\" is empty string', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);
bidRequest.ad_units[0].fpd = {
context: {
pbAdSlot: ''
adServer: {
adSlot: ''
}
}
};

Expand All @@ -1496,15 +1572,17 @@ describe('S2S Adapter', function () {
expect(parsedRequestBody.imp[0]).to.not.have.deep.nested.property('ext.context.data.adslot');
});

it('should send \"imp.ext.context.data.adslot\" if \"fpd.context.pbAdSlot\" value is a non-empty string', function () {
it('should send \"imp.ext.context.data.adslot\" if \"fpd.context.adServer.adSlot\" value is a non-empty string', function () {
const ortb2Config = utils.deepClone(CONFIG);
ortb2Config.endpoint = 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction';
const consentConfig = { s2sConfig: ortb2Config };
config.setConfig(consentConfig);
const bidRequest = utils.deepClone(REQUEST);
bidRequest.ad_units[0].fpd = {
context: {
pbAdSlot: '/a/b/c'
adServer: {
adSlot: '/a/b/c'
}
}
};

Expand Down
129 changes: 104 additions & 25 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1364,25 +1364,25 @@ describe('the rubicon adapter', function () {
}
});

it('should not send \"tg_i.dfp_ad_unit_code\" if \"fpd.context\" object is not valid', function () {
it('should not send \"tg_i.pbadslot’\" if \"fpd.context\" object is not valid', function () {
const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code');
expect(data).to.not.have.property('tg_i.pbadslot’');
});

it('should not send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.pbAdSlot\" is undefined', function () {
it('should not send \"tg_i.pbadslot’\" if \"fpd.context.pbAdSlot\" is undefined', function () {
bidderRequest.bids[0].fpd = {};

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code');
expect(data).to.not.have.property('tg_i.pbadslot’');
});

it('should not send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.pbAdSlot\" value is an empty string', function () {
it('should not send \"tg_i.pbadslot’\" if \"fpd.context.pbAdSlot\" value is an empty string', function () {
bidderRequest.bids[0].fpd = {
context: {
pbAdSlot: ''
Expand All @@ -1393,10 +1393,10 @@ describe('the rubicon adapter', function () {
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code');
expect(data).to.not.have.property('tg_i.pbadslot');
});

it('should send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.pbAdSlot\" value is a valid string', function () {
it('should send \"tg_i.pbadslot\" if \"fpd.context.pbAdSlot\" value is a valid string', function () {
bidderRequest.bids[0].fpd = {
context: {
pbAdSlot: 'abc'
Expand All @@ -1406,15 +1406,92 @@ describe('the rubicon adapter', function () {
const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.have.property('tg_i.pbadslot');
expect(data['tg_i.pbadslot']).to.equal('abc');
});

it('should send \"tg_i.pbadslot\" if \"fpd.context.pbAdSlot\" value is a valid string, but all leading slash characters should be removed', function () {
bidderRequest.bids[0].fpd = {
context: {
pbAdSlot: '/a/b/c'
}
};

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.have.property('tg_i.pbadslot');
expect(data['tg_i.pbadslot']).to.equal('a/b/c');
});
});

describe('GAM ad unit', function () {
beforeEach(function () {
// enforce that the bid at 0 does not have a 'context' property
if (bidderRequest.bids[0].hasOwnProperty('fpd')) {
delete bidderRequest.bids[0].fpd;
}
});

it('should not send \"tg_i.dfp_ad_unit_code’\" if \"fpd.context\" object is not valid', function () {
const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code’');
});

it('should not send \"tg_i.dfp_ad_unit_code’\" if \"fpd.context.adServer.adSlot\" is undefined', function () {
bidderRequest.bids[0].fpd = {};

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code’');
});

it('should not send \"tg_i.dfp_ad_unit_code’\" if \"fpd.context.adServer.adSlot\" value is an empty string', function () {
bidderRequest.bids[0].fpd = {
context: {
adServer: {
adSlot: ''
}
}
};

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.not.have.property('tg_i.dfp_ad_unit_code');
});

it('should send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.adServer.adSlot\" value is a valid string', function () {
bidderRequest.bids[0].fpd = {
context: {
adServer: {
adSlot: 'abc'
}
}
}

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
const data = parseQuery(request.data);

expect(data).to.be.an('Object');
expect(data).to.have.property('tg_i.dfp_ad_unit_code');
expect(data['tg_i.dfp_ad_unit_code']).to.equal('abc');
});

it('should send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.pbAdSlot\" value is a valid string, but all leading slash characters should be removed', function () {
it('should send \"tg_i.dfp_ad_unit_code\" if \"fpd.context.adServer.adSlot\" value is a valid string, but all leading slash characters should be removed', function () {
bidderRequest.bids[0].fpd = {
context: {
pbAdSlot: '/a/b/c'
adServer: {
adSlot: 'a/b/c'
}
}
};

Expand Down Expand Up @@ -1839,6 +1916,24 @@ describe('the rubicon adapter', function () {
bidderRequest.auctionStart + 100
);

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.imp[0].ext.context.data.pbadslot).to.equal('1234567890');
});

it('should include GAM ad unit in bid request', function () {
createVideoBidderRequest();
bidderRequest.bids[0].fpd = {
context: {
adServer: {
adSlot: '1234567890'
}
}
};

sandbox.stub(Date, 'now').callsFake(() =>
bidderRequest.auctionStart + 100
);

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.imp[0].ext.context.data.adslot).to.equal('1234567890');
});
Expand All @@ -1856,22 +1951,6 @@ describe('the rubicon adapter', function () {
});
});

it('should include pbAdSlot in bid request', function () {
createVideoBidderRequest();
bidderRequest.bids[0].fpd = {
context: {
pbAdSlot: '1234567890'
}
};

sandbox.stub(Date, 'now').callsFake(() =>
bidderRequest.auctionStart + 100
);

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.imp[0].ext.context.data.adslot).to.equal('1234567890');
});

describe('combineSlotUrlParams', function () {
it('should combine an array of slot url params', function () {
expect(spec.combineSlotUrlParams([])).to.deep.equal({});
Expand Down