Skip to content

Commit

Permalink
Update for Qwarry bid adapter (#5936)
Browse files Browse the repository at this point in the history
* qwarry bid adapter

* formatting fixes

* fix tests for qwarry

* qwarry bid adapter

* add header for qwarry bid adapter

* bid requests fix

* fix tests

* response fix

* fix tests for Qwarry bid adapter

* add pos parameter to qwarry bid adapter

Co-authored-by: Artem Kostritsa <akostritsa@akostritsa.com>
Co-authored-by: Alexander Kascheev <akascheev@asteriosoft.com>
  • Loading branch information
3 people authored Nov 9, 2020
1 parent ffc6210 commit 7070b1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/qwarryBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const spec = {
validBidRequests.forEach(bidRequest => {
bids.push({
bidId: bidRequest.bidId,
zoneToken: bidRequest.params.zoneToken
zoneToken: bidRequest.params.zoneToken,
pos: bidRequest.params.pos
})
})

Expand Down
5 changes: 3 additions & 2 deletions test/spec/modules/qwarryBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const REQUEST = {
'bidId': '456',
'bidder': 'qwarry',
'params': {
zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f'
zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f',
pos: 7
}
}

Expand Down Expand Up @@ -70,7 +71,7 @@ describe('qwarryBidAdapter', function () {
it('sends bid request to ENDPOINT via POST', function () {
expect(bidderRequest.method).to.equal('POST')
expect(bidderRequest.data.requestId).to.equal('123')
expect(bidderRequest.data.bids).to.deep.contains({ bidId: '456', zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f' })
expect(bidderRequest.data.bids).to.deep.contains({ bidId: '456', zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7 })
expect(bidderRequest.options.customHeaders).to.deep.equal({ 'Rtb-Direct': true })
expect(bidderRequest.options.contentType).to.equal('application/json')
expect(bidderRequest.url).to.equal(ENDPOINT)
Expand Down

0 comments on commit 7070b1f

Please sign in to comment.