Skip to content

Commit

Permalink
Pass through params to server (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
parisholley authored and matthewlane committed Mar 30, 2017
1 parent 5c2de1e commit f8ee3b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/adapters/mantis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]};
})
Expand Down
8 changes: 6 additions & 2 deletions test/spec/adapters/mantis_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ describe('mantis adapter tests', function () {
placementCode: 'foo',
sizes: [[728, 90]],
params: {
property: '1234'
property: '1234',
zoneId: 'zone1'
}
},
{
Expand All @@ -42,7 +43,8 @@ describe('mantis adapter tests', function () {
placementCode: 'bar',
sizes: [[300, 600], [300, 250]],
params: {
property: '1234'
property: '1234',
zoneId: 'zone2'
}
}
]
Expand Down Expand Up @@ -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');
});

Expand Down

0 comments on commit f8ee3b2

Please sign in to comment.