From 60b6571cb65433cc527e03595c36fdcddddda00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norbert=20W=C5=82osi=C5=84ski?= Date: Fri, 4 Jun 2021 14:12:35 +0200 Subject: [PATCH] add meta.advertiserDomains to bid response --- modules/justpremiumBidAdapter.js | 5 ++++- test/spec/modules/justpremiumBidAdapter_spec.js | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/justpremiumBidAdapter.js b/modules/justpremiumBidAdapter.js index 1f84feee7d1..b0d7722fa06 100644 --- a/modules/justpremiumBidAdapter.js +++ b/modules/justpremiumBidAdapter.js @@ -90,7 +90,10 @@ export const spec = { netRevenue: true, currency: bid.currency || 'USD', ttl: bid.ttl || spec.time, - format: bid.format + format: bid.format, + meta: { + advertiserDomains: bid.adomain && bid.adomain.length > 0 ? bid.adomain : [] + } } bidResponses.push(bidResponse) } diff --git a/test/spec/modules/justpremiumBidAdapter_spec.js b/test/spec/modules/justpremiumBidAdapter_spec.js index 7cc154254ff..cb3648cba44 100644 --- a/test/spec/modules/justpremiumBidAdapter_spec.js +++ b/test/spec/modules/justpremiumBidAdapter_spec.js @@ -103,7 +103,8 @@ describe('justpremium adapter', function () { 'width': 970, 'price': 0.52, 'format': 'lb', - 'adm': 'creative code' + 'adm': 'creative code', + 'adomain': ['justpremium.com'] }] }, 'pass': { @@ -123,7 +124,10 @@ describe('justpremium adapter', function () { netRevenue: true, currency: 'USD', ttl: 60000, - format: 'lb' + format: 'lb', + meta: { + advertiserDomains: ['justpremium.com'] + }, } ] @@ -140,6 +144,7 @@ describe('justpremium adapter', function () { expect(result[0].creativeId).to.equal(3213123) expect(result[0].netRevenue).to.equal(true) expect(result[0].format).to.equal('lb') + expect(result[0].meta.advertiserDomains[0]).to.equal('justpremium.com') }) it('Verify wrong server response', function () {