From e57dd01097afc4c318b3c046b3e68d2b23e39ce8 Mon Sep 17 00:00:00 2001 From: Paris Holley Date: Tue, 28 Mar 2017 09:41:20 -0400 Subject: [PATCH] pass through params to server --- src/adapters/mantis.js | 1 + test/spec/adapters/mantis_spec.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/adapters/mantis.js b/src/adapters/mantis.js index 5b4b17f1638..6ca3faa0bca 100644 --- a/src/adapters/mantis.js +++ b/src/adapters/mantis.js @@ -206,6 +206,7 @@ module.exports = function () { bids: params.bids.map(function (bid) { return { bidId: bid.bidId, + config: bid.params, sizes: bid.sizes.map(function (size) { return {width: size[0], height: size[1]}; }) diff --git a/test/spec/adapters/mantis_spec.js b/test/spec/adapters/mantis_spec.js index 616dbcdc0d4..1ed6ea089e8 100644 --- a/test/spec/adapters/mantis_spec.js +++ b/test/spec/adapters/mantis_spec.js @@ -33,7 +33,8 @@ describe('mantis adapter tests', function () { placementCode: 'foo', sizes: [[728, 90]], params: { - property: '1234' + property: '1234', + zoneId: 'zone1' } }, { @@ -42,7 +43,8 @@ describe('mantis adapter tests', function () { placementCode: 'bar', sizes: [[300, 600], [300, 250]], params: { - property: '1234' + property: '1234', + zoneId: 'zone2' } } ] @@ -103,11 +105,13 @@ describe('mantis adapter tests', function () { expect(serverCall).to.string('bids[0][bidId]=bidId1&'); expect(serverCall).to.string('bids[0][sizes][0][width]=728&'); expect(serverCall).to.string('bids[0][sizes][0][height]=90&'); + expect(serverCall).to.string('bids[0][config][zoneId]=zone1&'); expect(serverCall).to.string('bids[1][bidId]=bidId2&'); expect(serverCall).to.string('bids[1][sizes][0][width]=300&'); expect(serverCall).to.string('bids[1][sizes][0][height]=600&'); expect(serverCall).to.string('bids[1][sizes][1][width]=300&'); expect(serverCall).to.string('bids[1][sizes][1][height]=250&'); + expect(serverCall).to.string('bids[1][config][zoneId]=zone2&'); expect(serverCall).to.string('version=1'); });