Skip to content

Commit

Permalink
set new bid.descriptionUrl option to impression_id and updated unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dbridges12 authored and snapwich committed Feb 3, 2017
1 parent c1725e5 commit 1f15669
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/adapters/rubicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ function RubiconAdapter() {
if (bidRequest.mediaType === 'video') {
bid.width = bidRequest.params.video.playerWidth;
bid.height = bidRequest.params.video.playerHeight;
bid.vastUrl = ad.impression_id;
bid.vastUrl = ad.creative_depot_url;
bid.descriptionUrl = ad.impression_id;
bid.impression_id = ad.impression_id;
} else {
bid.ad = _renderCreative(ad.script, ad.impression_id);
Expand Down
11 changes: 6 additions & 5 deletions test/spec/adapters/rubicon_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('the rubicon adapter', () => {
sandbox.stub(rubiconAdapter, 'callBids');

adapterManager.callBids({
adUnits: [clone(adUnit)]
adUnits: [clone(adUnit)]
});

let bidderRequest = rubiconAdapter.callBids.getCall(0).args[0];
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('the rubicon adapter', () => {

ordering = masSizeOrdering([[120, 600], [320, 50], [160,600], [640, 480],[336, 280], [200, 600], [728, 90]]);
expect(ordering).to.deep.equal([2, 9, 8, 16, 43, 65, 126]);
})
});

});

Expand Down Expand Up @@ -303,7 +303,7 @@ describe('the rubicon adapter', () => {

expect(post).to.have.property('page_url').that.is.a('string');
expect(post.resolution).to.match(/\d+x\d+/);
expect(post.account_id).to.equal('14062')
expect(post.account_id).to.equal('14062');
expect(post.integration).to.equal(INTEGRATION);
expect(post).to.have.property('timeout').that.is.a('number');
expect(post.timeout < 5000).to.equal(true);
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('the rubicon adapter', () => {
expect(slot.visitor).to.have.property('ucat').that.equals('new');
expect(slot.visitor).to.have.property('lastsearch').that.equals('iphone');

})
});

});

Expand Down Expand Up @@ -639,12 +639,13 @@ describe('the rubicon adapter', () => {
expect(bids[0].bidderCode).to.equal('rubicon');
expect(bids[0].creative_id).to.equal(999999);
expect(bids[0].cpm).to.equal(1);
expect(bids[0].descriptionUrl).to.equal('a40fe16e-d08d-46a9-869d-2e1573599e0c');
expect(bids[0].vastUrl).to.equal(
'https://optimized-by-adv.rubiconproject.com/v1/creative/a40fe16e-d08d-46a9-869d-2e1573599e0c.xml'
);
expect(bids[0].impression_id).to.equal('a40fe16e-d08d-46a9-869d-2e1573599e0c');

})
});

});

Expand Down

0 comments on commit 1f15669

Please sign in to comment.