Skip to content

Commit d462b17

Browse files
authored
Revert "9.0: Update gumgumBidAdapter.js (#11693)" (#11717)
This reverts commit caa9979.
1 parent fd8f2e1 commit d462b17

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

modules/gumgumBidAdapter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@ function buildRequests(validBidRequests, bidderRequest) {
374374
data.fpc = currency;
375375
}
376376

377+
if (params.iriscat && typeof params.iriscat === 'string') {
378+
data.iriscat = params.iriscat;
379+
}
380+
381+
if (params.irisid && typeof params.irisid === 'string') {
382+
data.irisid = params.irisid;
383+
}
384+
377385
if (params.zone || params.pubId) {
378386
params.zone ? (data.t = params.zone) : (data.pubId = params.pubId);
379387

test/spec/modules/gumgumBidAdapter_spec.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,36 @@ describe('gumgumAdapter', function () {
254254
expect(legReq.data.si).to.equal(invalidSlotId);
255255
});
256256

257+
it('should set the iriscat param when found', function () {
258+
const request = { ...bidRequests[0], params: { iriscat: 'abc123' } }
259+
const bidRequest = spec.buildRequests([request])[0];
260+
expect(bidRequest.data).to.have.property('iriscat');
261+
});
262+
263+
it('should not set the iriscat param when not found', function () {
264+
const request = { ...bidRequests[0] }
265+
const bidRequest = spec.buildRequests([request])[0];
266+
expect(bidRequest.data).to.not.have.property('iriscat');
267+
});
268+
269+
it('should set the irisid param when found', function () {
270+
const request = { ...bidRequests[0], params: { irisid: 'abc123' } }
271+
const bidRequest = spec.buildRequests([request])[0];
272+
expect(bidRequest.data).to.have.property('irisid');
273+
});
274+
275+
it('should not set the irisid param when not found', function () {
276+
const request = { ...bidRequests[0] }
277+
const bidRequest = spec.buildRequests([request])[0];
278+
expect(bidRequest.data).to.not.have.property('irisid');
279+
});
280+
281+
it('should not set the irisid param when not of type string', function () {
282+
const request = { ...bidRequests[0], params: { irisid: 123456 } }
283+
const bidRequest = spec.buildRequests([request])[0];
284+
expect(bidRequest.data).to.not.have.property('irisid');
285+
});
286+
257287
it('should set the global placement id (gpid) if in adserver property', function () {
258288
const req = { ...bidRequests[0],
259289
ortb2Imp: {
@@ -393,6 +423,25 @@ describe('gumgumAdapter', function () {
393423
expect(bidRequest.data).to.include.any.keys('t');
394424
expect(bidRequest.data).to.include.any.keys('fp');
395425
});
426+
it('should set iriscat parameter if iriscat param is found and is of type string', function () {
427+
const iriscat = 'segment';
428+
const request = { ...bidRequests[0] };
429+
request.params = { ...request.params, iriscat };
430+
const bidRequest = spec.buildRequests([request])[0];
431+
expect(bidRequest.data.iriscat).to.equal(iriscat);
432+
});
433+
it('should not send iriscat parameter if iriscat param is not found', function () {
434+
const request = { ...bidRequests[0] };
435+
const bidRequest = spec.buildRequests([request])[0];
436+
expect(bidRequest.data.iriscat).to.be.undefined;
437+
});
438+
it('should not send iriscat parameter if iriscat param is not of type string', function () {
439+
const iriscat = 123;
440+
const request = { ...bidRequests[0] };
441+
request.params = { ...request.params, iriscat };
442+
const bidRequest = spec.buildRequests([request])[0];
443+
expect(bidRequest.data.iriscat).to.be.undefined;
444+
});
396445
it('should send pubId if inScreenPubID param is specified', function () {
397446
const request = Object.assign({}, bidRequests[0]);
398447
delete request.params;

0 commit comments

Comments
 (0)