Skip to content

Commit

Permalink
Update schain path in ORTB path for spotxBidAdapter (prebid#4377)
Browse files Browse the repository at this point in the history
- Move schain object from request.ext.source.ext.schain to
	  request.source.ext.schain
  • Loading branch information
codybonney authored and jsnellbaker committed Oct 25, 2019
1 parent 2376a7f commit 6c908ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion modules/spotxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const spec = {

// Add schain object if it is present
if (bid && bid.schain) {
requestPayload['ext']['source'] = {
requestPayload['source'] = {
ext: {
schain: bid.schain
}
Expand Down
31 changes: 16 additions & 15 deletions test/spec/modules/spotxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,7 @@ describe('the spotx adapter', function () {
expect(request.data.imp.bidfloor).to.equal(123);
expect(request.data.ext).to.deep.equal({
number_of_ads: 2,
wrap_response: 1,
source: {
ext: {
schain: {
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1
}
]
}
}
}
wrap_response: 1
});
expect(request.data.user.ext).to.deep.equal({
consented_providers_settings: GOOGLE_CONSENT,
Expand All @@ -209,6 +195,21 @@ describe('the spotx adapter', function () {
}],
fpc: 'pubcid_1'
})

expect(request.data.source).to.deep.equal({
ext: {
schain: {
complete: 1,
nodes: [
{
asi: 'indirectseller.com',
sid: '00001',
hp: 1
}
]
}
}
})
});

it('should process premarket bids', function() {
Expand Down

0 comments on commit 6c908ce

Please sign in to comment.