Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.0: Update gumgumBidAdapter.js #11693

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,6 @@ function buildRequests(validBidRequests, bidderRequest) {
data.fpc = currency;
}

if (params.iriscat && typeof params.iriscat === 'string') {
data.iriscat = params.iriscat;
}

if (params.irisid && typeof params.irisid === 'string') {
data.irisid = params.irisid;
}

if (params.zone || params.pubId) {
params.zone ? (data.t = params.zone) : (data.pubId = params.pubId);

Expand Down
49 changes: 0 additions & 49 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,36 +254,6 @@ describe('gumgumAdapter', function () {
expect(legReq.data.si).to.equal(invalidSlotId);
});

it('should set the iriscat param when found', function () {
const request = { ...bidRequests[0], params: { iriscat: 'abc123' } }
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.have.property('iriscat');
});

it('should not set the iriscat param when not found', function () {
const request = { ...bidRequests[0] }
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.not.have.property('iriscat');
});

it('should set the irisid param when found', function () {
const request = { ...bidRequests[0], params: { irisid: 'abc123' } }
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.have.property('irisid');
});

it('should not set the irisid param when not found', function () {
const request = { ...bidRequests[0] }
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.not.have.property('irisid');
});

it('should not set the irisid param when not of type string', function () {
const request = { ...bidRequests[0], params: { irisid: 123456 } }
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data).to.not.have.property('irisid');
});

it('should set the global placement id (gpid) if in adserver property', function () {
const req = { ...bidRequests[0],
ortb2Imp: {
Expand Down Expand Up @@ -423,25 +393,6 @@ describe('gumgumAdapter', function () {
expect(bidRequest.data).to.include.any.keys('t');
expect(bidRequest.data).to.include.any.keys('fp');
});
it('should set iriscat parameter if iriscat param is found and is of type string', function () {
const iriscat = 'segment';
const request = { ...bidRequests[0] };
request.params = { ...request.params, iriscat };
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data.iriscat).to.equal(iriscat);
});
it('should not send iriscat parameter if iriscat param is not found', function () {
const request = { ...bidRequests[0] };
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data.iriscat).to.be.undefined;
});
it('should not send iriscat parameter if iriscat param is not of type string', function () {
const iriscat = 123;
const request = { ...bidRequests[0] };
request.params = { ...request.params, iriscat };
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data.iriscat).to.be.undefined;
});
it('should send pubId if inScreenPubID param is specified', function () {
const request = Object.assign({}, bidRequests[0]);
delete request.params;
Expand Down