Skip to content

Commit

Permalink
Automatad Bid Adapter: Add adunit code to bid request (#5567)
Browse files Browse the repository at this point in the history
* added automatad bid adapter

* added automatad bid adapter readme

* added automatad bidder adapter unit test

* updated maintainer email id for automatad adapter

* refactored automatadBidAdapter js

* refactored automatadBidAdapter unit test

* refactored automatadBidAdapter unit test

* added usersync code to automatad bid adapter

* Added unit test for onBidWon in automatadBidAdapter_spec

* removed trailing spaces

* removed trailing space

* changes for getUserSync function

* lint error fixes

* updated usersync url

* additional test for onBidWon function added

* added ajax stub in test

* updated winurl params

* lint fixes

* added adunitCode in bid request

* added test for adunit code
  • Loading branch information
Kanchika - Automatad authored Aug 6, 2020
1 parent 412b0ce commit 44e4e7a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
21 changes: 12 additions & 9 deletions modules/automatadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ export const spec = {
const siteId = validBidRequests[0].params.siteId
const placementId = validBidRequests[0].params.placementId

const impressions = validBidRequests.map(bidRequest => ({
id: bidRequest.bidId,
banner: {
format: bidRequest.sizes.map(sizeArr => ({
w: sizeArr[0],
h: sizeArr[1],
}))
},
}))
const impressions = validBidRequests.map(bidRequest => {
return {
id: bidRequest.bidId,
adUnitCode: bidRequest.adUnitCode,
banner: {
format: bidRequest.sizes.map(sizeArr => ({
w: sizeArr[0],
h: sizeArr[1],
}))
},
}
})

// params from bid request
const openrtbRequest = {
Expand Down
5 changes: 5 additions & 0 deletions test/spec/modules/automatadBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ describe('automatadBidAdapter', function () {
let r = rdata.imp[0]
expect(r.siteID !== null && r.placementID !== null).to.be.true
})

it('should include adunit code', function () {
let r = rdata.imp[0]
expect(r.adUnitCode !== null).to.be.true
})
})

describe('interpretResponse', function () {
Expand Down

0 comments on commit 44e4e7a

Please sign in to comment.