Skip to content

Commit

Permalink
adds test
Browse files Browse the repository at this point in the history
  • Loading branch information
susyt committed Jun 4, 2020
1 parent 092056c commit 7ff16b8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,27 @@ describe('gumgumAdapter', function () {
expect(bidRequest.data.pubId).to.equal(request.params.inScreenPubID);
expect(bidRequest.data).to.not.include.any.keys('t');
});
it('should send pubId if videoPubID param is specified', function () {
const mediaTypes = {
video: {
playerSize: [640, 480],
context: 'instream',
minduration: 1,
maxduration: 2,
linearity: 1,
startdelay: 1,
placement: 123456,
protocols: [1, 2]
}
};
const request = Object.assign({}, bidRequests[0]);
request.mediaTypes = mediaTypes
request.params = { 'videoPubID': 123 };
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.include.any.keys('pubId');
expect(bidRequest.data.pubId).to.equal(request.params.videoPubID);
expect(bidRequest.data).to.not.include.any.keys('t');
});
it('should set a ni parameter in bid request if ICV request param is found', function () {
const request = Object.assign({}, bidRequests[0]);
delete request.params;
Expand Down

0 comments on commit 7ff16b8

Please sign in to comment.