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

Ogury bid adapter: sending all custom params to the bidder #7685

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion modules/oguryBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ function buildRequests(validBidRequests, bidderRequest) {
bidfloor: getFloor(bidRequest),
banner: {
format: sizes
}
},
ext: bidRequest.params
});
}
});
Expand Down
24 changes: 13 additions & 11 deletions test/spec/modules/oguryBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('OguryBidAdapter', function () {
};
});

it('should return sync array with two elements of type image', () => {
it('should return syncs array with two elements of type image', () => {
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);

expect(userSyncs).to.have.lengthOf(2);
Expand All @@ -129,7 +129,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.contain('https://ms-cookie-sync.presage.io/ttd/init-sync');
});

it('should set the same source as query param', () => {
it('should set the source as query param', () => {
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
expect(userSyncs[0].url).to.contain('source=prebid');
expect(userSyncs[1].url).to.contain('source=prebid');
Expand All @@ -146,7 +146,7 @@ describe('OguryBidAdapter', function () {
expect(spec.getUserSyncs(syncOptions, [], gdprConsent)).to.have.lengthOf(0);
});

it('should return sync array with two elements of type image when consentString is undefined', () => {
it('should return syncs array with two elements of type image when consentString is undefined', () => {
gdprConsent = {
gdprApplies: true,
consentString: undefined
Expand All @@ -160,7 +160,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
});

it('should return sync array with two elements of type image when consentString is null', () => {
it('should return syncs array with two elements of type image when consentString is null', () => {
gdprConsent = {
gdprApplies: true,
consentString: null
Expand All @@ -174,7 +174,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
});

it('should return sync array with two elements of type image when gdprConsent is undefined', () => {
it('should return syncs array with two elements of type image when gdprConsent is undefined', () => {
gdprConsent = undefined;

const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
Expand All @@ -185,7 +185,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
});

it('should return sync array with two elements of type image when gdprConsent is null', () => {
it('should return syncs array with two elements of type image when gdprConsent is null', () => {
gdprConsent = null;

const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
Expand All @@ -196,7 +196,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
});

it('should return sync array with two elements of type image when gdprConsent is null and gdprApplies is false', () => {
it('should return syncs array with two elements of type image when gdprConsent is null and gdprApplies is false', () => {
gdprConsent = {
gdprApplies: false,
consentString: null
Expand All @@ -210,7 +210,7 @@ describe('OguryBidAdapter', function () {
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
});

it('should return sync array with two elements of type image when gdprConsent is empty string and gdprApplies is false', () => {
it('should return syncs array with two elements of type image when gdprConsent is empty string and gdprApplies is false', () => {
gdprConsent = {
gdprApplies: false,
consentString: ''
Expand Down Expand Up @@ -240,7 +240,8 @@ describe('OguryBidAdapter', function () {
w: 300,
h: 250
}]
}
},
ext: bidRequests[0].params
}, {
id: bidRequests[1].bidId,
tagid: bidRequests[1].params.adUnitId,
Expand All @@ -250,7 +251,8 @@ describe('OguryBidAdapter', function () {
w: 600,
h: 500
}]
}
},
ext: bidRequests[1].params
}],
regs: {
ext: {
Expand Down Expand Up @@ -549,7 +551,7 @@ describe('OguryBidAdapter', function () {
xhr.restore()
})

it('should send notification on bid timeout', function() {
it('should send on bid timeout notification', function() {
const bid = {
ad: '<img style="width: 300px; height: 250px;" src="https://assets.afcdn.com/recipe/20190529/93153_w1024h768c1cx2220cy1728cxt0cyt0cxb4441cyb3456.jpg" alt="cookies" />',
cpm: 3
Expand Down