Skip to content

Commit

Permalink
add withSite() method to TtxRequestBuilder
Browse files Browse the repository at this point in the history
add withSite() method to TtxRequestBuilder
  • Loading branch information
Gleb Glushtsov committed Sep 13, 2018
1 parent 059437b commit 90e5bed
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions test/spec/modules/33acrossBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ describe('33acrossBidAdapter:', function () {
return this;
};

this.withSite = site => {
Object.assign(ttxRequest, { site });
return this;
};

this.build = () => ttxRequest;
}

Expand Down Expand Up @@ -393,34 +398,12 @@ describe('33acrossBidAdapter:', function () {
let ttxRequest, serverRequest;

beforeEach(function() {
ttxRequest = {
imp: [{
banner: {
format: [
{
w: 300,
h: 250,
ext: {}
},
{
w: 728,
h: 90,
ext: {}
}
]
},
ext: {
ttx: {
prod: PRODUCT_ID
}
}
}],
site: {
ttxRequest = new TtxRequestBuilder()
.withSite({
id: SITE_ID,
page: 'http://test-url.com'
},
id: 'b1'
};
})
.build();
serverRequest = new ServerRequestBuilder()
.withUrl('//staging-ssc.33across.com/api/v1/hb')
.withData(ttxRequest)
Expand Down

0 comments on commit 90e5bed

Please sign in to comment.