Skip to content

Commit

Permalink
Removing Digitrust related test case for PubMatic bidder (prebid#5426)
Browse files Browse the repository at this point in the history
* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* removed digitrust test case
  • Loading branch information
pm-harshad-mane authored Jun 29, 2020
1 parent 81d0c58 commit 240e605
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1350,47 +1350,6 @@ describe('PubMatic adapter', function () {
});
});

describe('Digitrust Id', function() {
it('send the digitrust id if it is present', function() {
bidRequests[0].userId = {};
bidRequests[0].userId.digitrustid = {data: {id: 'digitrust_user_id'}};
bidRequests[0].userIdAsEids = createEidsArray(bidRequests[0].userId);
let request = spec.buildRequests(bidRequests, {});
let data = JSON.parse(request.data);
expect(data.user.eids).to.deep.equal([{
'source': 'digitru.st',
'uids': [{
'id': 'digitrust_user_id',
'atype': 1
}]
}]);
});

it('do not pass if not string', function() {
bidRequests[0].userId = {};
bidRequests[0].userId.digitrustid = {data: {id: 1}};
bidRequests[0].userIdAsEids = createEidsArray(bidRequests[0].userId);
let request = spec.buildRequests(bidRequests, {});
let data = JSON.parse(request.data);
expect(data.user.eids).to.equal(undefined);
bidRequests[0].userId.digitrustid = {data: {id: []}};
bidRequests[0].userIdAsEids = createEidsArray(bidRequests[0].userId);
request = spec.buildRequests(bidRequests, {});
data = JSON.parse(request.data);
expect(data.user.eids).to.equal(undefined);
bidRequests[0].userId.digitrustid = {data: {id: null}};
bidRequests[0].userIdAsEids = createEidsArray(bidRequests[0].userId);
request = spec.buildRequests(bidRequests, {});
data = JSON.parse(request.data);
expect(data.user.eids).to.equal(undefined);
bidRequests[0].userId.digitrustid = {data: {id: {}}};
bidRequests[0].userIdAsEids = createEidsArray(bidRequests[0].userId);
request = spec.buildRequests(bidRequests, {});
data = JSON.parse(request.data);
expect(data.user.eids).to.equal(undefined);
});
});

describe('ID5 Id', function() {
it('send the id5 id if it is present', function() {
bidRequests[0].userId = {};
Expand Down

0 comments on commit 240e605

Please sign in to comment.