Skip to content

Commit

Permalink
alter sonobi unit test to fix Edge test failure (#2904)
Browse files Browse the repository at this point in the history
* alter unit test to fix Edge test failure

* removing port from unit test
  • Loading branch information
jsnellbaker authored Jul 27, 2018
1 parent a441a81 commit 58ce989
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/spec/modules/sonobiBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('SonobiBidAdapter', () => {
'url': 'https://apex.go.sonobi.com/trinity.json',
'withCredentials': true,
'data': {
'key_maker': '{"30b31c1838de1f":"1a2b3c4d5e6f1a2b3c4d|300x250,300x600|f=1.25","/7780971/sparks_prebid_LB|30b31c1838de1e":"300x250,300x600"}', 'ref': 'http://localhost:9876/', 's': '2474372d-c0ff-4f46-aef4-a173058403d9', 'pv': 'c9cfc207-cd83-4a01-b591-8bb29389d4b0'
'key_maker': '{"30b31c1838de1f":"1a2b3c4d5e6f1a2b3c4d|300x250,300x600|f=1.25","/7780971/sparks_prebid_LB|30b31c1838de1e":"300x250,300x600"}', 'ref': 'http://localhost/', 's': '2474372d-c0ff-4f46-aef4-a173058403d9', 'pv': 'c9cfc207-cd83-4a01-b591-8bb29389d4b0'
},
'bidderRequests': [
{
Expand Down Expand Up @@ -294,7 +294,7 @@ describe('SonobiBidAdapter', () => {
'cpm': 1.07,
'width': 300,
'height': 600,
'ad': '<script type="text/javascript" src="https://mco-1-apex.go.sonobi.com/sbi.js?aid=30292e432662bd5f86d90774b944b039&as=null&ref=http://localhost:9876/"></script>',
'ad': '<script type="text/javascript" src="https://mco-1-apex.go.sonobi.com/sbi.js?aid=30292e432662bd5f86d90774b944b039&as=null&ref=http://localhost/"></script>',
'ttl': 500,
'creativeId': '1234abcd',
'netRevenue': true,
Expand All @@ -306,7 +306,7 @@ describe('SonobiBidAdapter', () => {
'cpm': 1.25,
'width': 300,
'height': 250,
'ad': 'https://mco-1-apex.go.sonobi.com/vast.xml?vid=30292e432662bd5f86d90774b944b038&ref=http://localhost:9876/',
'ad': 'https://mco-1-apex.go.sonobi.com/vast.xml?vid=30292e432662bd5f86d90774b944b038&ref=http://localhost/',
'ttl': 500,
'creativeId': '30292e432662bd5f86d90774b944b038',
'netRevenue': true,
Expand All @@ -318,6 +318,10 @@ describe('SonobiBidAdapter', () => {

it('should map bidResponse to prebidResponse', () => {
const response = spec.interpretResponse(bidResponse, bidRequests);
response.forEach(resp => {
let regx = /http:\/\/localhost:9876\/.*?(?="|$)/
resp.ad = resp.ad.replace(regx, 'http://localhost/');
});
expect(response).to.deep.equal(prebidResponse);
})
})
Expand Down

0 comments on commit 58ce989

Please sign in to comment.