Skip to content

Commit

Permalink
add appnexuspsp for PBSadapter defaultVendor (#7220)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnellbaker authored Jul 29, 2021
1 parent 0896f79 commit ed036b9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/prebidServerBidAdapter/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ export const S2S_VENDORS = {
},
timeout: 1000
},
'appnexuspsp': {
adapter: 'prebidServer',
enabled: true,
endpoint: {
p1Consent: 'https://ib.adnxs.com/openrtb2/prebid',
noP1Consent: 'https://ib.adnxs-simple.com/openrtb2/prebid'
},
timeout: 1000
},
'rubicon': {
adapter: 'prebidServer',
enabled: true,
Expand Down
21 changes: 21 additions & 0 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2580,6 +2580,27 @@ describe('S2S Adapter', function () {
expect(vendorConfig).to.have.property('timeout', 750);
});

it('should configure the s2sConfig object with appnexuspsp vendor defaults unless specified by user', function () {
const options = {
accountId: '123',
bidders: ['appnexus'],
defaultVendor: 'appnexuspsp',
timeout: 750
};

config.setConfig({ s2sConfig: options });
sinon.assert.notCalled(logErrorSpy);

let vendorConfig = config.getConfig('s2sConfig');
expect(vendorConfig).to.have.property('accountId', '123');
expect(vendorConfig).to.have.property('adapter', 'prebidServer');
expect(vendorConfig.bidders).to.deep.equal(['appnexus']);
expect(vendorConfig.enabled).to.be.true;
expect(vendorConfig.endpoint).to.deep.equal({p1Consent: 'https://ib.adnxs.com/openrtb2/prebid', noP1Consent: 'https://ib.adnxs-simple.com/openrtb2/prebid'});
expect(vendorConfig.syncEndpoint).to.be.undefined;
expect(vendorConfig).to.have.property('timeout', 750);
});

it('should configure the s2sConfig object with rubicon vendor defaults unless specified by user', function () {
const options = {
accountId: 'abc',
Expand Down

0 comments on commit ed036b9

Please sign in to comment.