Skip to content

Commit f0a3c8d

Browse files
committed
add tests
1 parent b682008 commit f0a3c8d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

test/spec/modules/dasBidAdapter_spec.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,35 @@ describe('dasBidAdapter', function () {
265265
expect(payload.ext.network).to.equal('network1');
266266
});
267267

268+
it('should set withCredentials to false when adbeta flag is present', function () {
269+
const bidRequestsWithAdbeta = [{
270+
bidId: 'bid123',
271+
params: {
272+
site: 'site1',
273+
area: 'area1',
274+
slot: 'slot1',
275+
network: 'network1',
276+
adbeta: 'l1021885!slot.nativestd',
277+
pageContext: {}
278+
},
279+
mediaTypes: {
280+
banner: {
281+
sizes: [[300, 250]]
282+
}
283+
}
284+
}];
285+
286+
const bidderRequestWithAdbeta = {
287+
bidderRequestId: 'reqId123',
288+
ortb2: {},
289+
adbeta: true
290+
};
291+
292+
const request = spec.buildRequests(bidRequestsWithAdbeta, bidderRequestWithAdbeta);
293+
294+
expect(request.options.withCredentials).to.be.false;
295+
});
296+
268297
describe('interpretResponse', function () {
269298
const serverResponse = {
270299
body: {

0 commit comments

Comments
 (0)