Skip to content

Commit

Permalink
vidazoo adapter - GDPR support (prebid#2834)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewizarodofoz authored and Shai HP committed Jul 22, 2018
1 parent 1142d4d commit 7634be1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/spec/modules/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {expect} from 'chai';
import {spec as adapter, URL} from 'modules/vidazooBidAdapter';
import * as utils from 'src/utils';

const BID = {
'bidId': '2d52001cabd527',
'params': {
Expand All @@ -19,6 +20,12 @@ const BID = {
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a'
};

const BIDDER_REQUEST = {
'gdprConsent': {
'consentString': 'consent_string'
}
};

const SERVER_RESPONSE = {
body: {
'ad': '<iframe>console.log("hello world")</iframe>',
Expand Down Expand Up @@ -109,12 +116,13 @@ describe('VidazooBidAdapter', () => {
});

it('should build request for each size', () => {
const requests = adapter.buildRequests([BID]);
const requests = adapter.buildRequests([BID], BIDDER_REQUEST);
expect(requests).to.have.length(2);
expect(requests[0]).to.deep.equal({
method: 'GET',
url: `${URL}/prebid/59db6b3b4ffaa70004f45cdc`,
data: {
consent: 'consent_string',
width: '300',
height: '250',
url: 'http://www.greatsite.com',
Expand All @@ -130,6 +138,7 @@ describe('VidazooBidAdapter', () => {
method: 'GET',
url: `${URL}/prebid/59db6b3b4ffaa70004f45cdc`,
data: {
consent: 'consent_string',
width: '300',
height: '600',
url: 'http://www.greatsite.com',
Expand Down

0 comments on commit 7634be1

Please sign in to comment.