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

(Sovrn) Configurable TTL from bid response #5880

Merged
merged 19 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d5d4752
Merge pull request #18 from prebid/master
jrosendahl Jun 25, 2019
45c8640
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Aug 22, 2019
8ee1e6a
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Oct 1, 2019
c075f77
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Oct 7, 2019
f1fa50b
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Oct 16, 2019
acf3a5e
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Oct 25, 2019
cf93fcb
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Oct 28, 2019
6d178cc
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Nov 7, 2019
21b95e6
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Nov 8, 2019
fc998a5
Merge remote-tracking branch 'upstream/master'
weswhitney Nov 22, 2019
fb48495
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Dec 6, 2019
c2cc1f2
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Dec 13, 2019
6e1e138
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Dec 17, 2019
cb7c2da
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Mar 23, 2020
079cfa2
Merge branch 'master' of https://github.com/prebid/Prebid.js
aprakash-sovrn Mar 27, 2020
c153809
Merge remote-tracking branch 'upstream/master'
Jun 17, 2020
6a8813f
Merge branch 'master' of github.com:sovrn/Prebid.js
Oct 7, 2020
90fa163
Merge remote-tracking branch 'upstream/master'
jrosendahl Oct 16, 2020
b45874d
configurable TTL for impressions
jrosendahl Oct 19, 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
2 changes: 1 addition & 1 deletion modules/sovrnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const spec = {
netRevenue: true,
mediaType: BANNER,
ad: decodeURIComponent(`${sovrnBid.adm}<img src="${sovrnBid.nurl}">`),
ttl: 60
ttl: sovrnBid.ttl || 90
});
});
}
Expand Down
35 changes: 28 additions & 7 deletions test/spec/modules/sovrnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,16 @@ describe('sovrnBidAdapter', function() {
'currency': 'USD',
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src=<!-- NURL -->>`),
'ttl': 60000
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 90
}];

let result = spec.interpretResponse(response);
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse[0]));
expect(result[0]).to.deep.equal(expectedResponse[0]);
});

it('should get correct bid response when dealId is passed', function () {
response.body.dealid = 'baking';
response.body.seatbid[0].bid[0].dealid = 'baking';

let expectedResponse = [{
'requestId': '263c448586f5a1',
Expand All @@ -352,12 +352,33 @@ describe('sovrnBidAdapter', function() {
'currency': 'USD',
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src=<!-- NURL -->>`),
'ttl': 60000
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 90
}];

let result = spec.interpretResponse(response);
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse[0]));
expect(result[0]).to.deep.equal(expectedResponse[0]);
});

it('should get correct bid response when ttl is set', function () {
response.body.seatbid[0].bid[0].ttl = 480;

let expectedResponse = [{
'requestId': '263c448586f5a1',
'cpm': 0.45882675,
'width': 728,
'height': 90,
'creativeId': 'creativelycreatedcreativecreative',
'dealId': null,
'currency': 'USD',
'netRevenue': true,
'mediaType': 'banner',
'ad': decodeURIComponent(`<!-- Creative --><img src="<!-- NURL -->">`),
'ttl': 480
}];

let result = spec.interpretResponse(response);
expect(result[0]).to.deep.equal(expectedResponse[0]);
});

it('handles empty bid response', function () {
Expand Down