From fab154379e398748e44e6b3cb846f0b620a2b7c9 Mon Sep 17 00:00:00 2001 From: Jason Snellbaker Date: Fri, 27 Jul 2018 09:43:40 -0400 Subject: [PATCH 1/2] alter unit test to fix Edge test failure --- test/spec/modules/sonobiBidAdapter_spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/spec/modules/sonobiBidAdapter_spec.js b/test/spec/modules/sonobiBidAdapter_spec.js index feeaafbbfae..ec225caeab4 100644 --- a/test/spec/modules/sonobiBidAdapter_spec.js +++ b/test/spec/modules/sonobiBidAdapter_spec.js @@ -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:9876/'); + }); expect(response).to.deep.equal(prebidResponse); }) }) From d20ca7f45c466f09011a8e814faa82577b67ed49 Mon Sep 17 00:00:00 2001 From: Jason Snellbaker Date: Fri, 27 Jul 2018 12:40:24 -0400 Subject: [PATCH 2/2] removing port from unit test --- test/spec/modules/sonobiBidAdapter_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/spec/modules/sonobiBidAdapter_spec.js b/test/spec/modules/sonobiBidAdapter_spec.js index ec225caeab4..1b0986cb8c1 100644 --- a/test/spec/modules/sonobiBidAdapter_spec.js +++ b/test/spec/modules/sonobiBidAdapter_spec.js @@ -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': [ { @@ -294,7 +294,7 @@ describe('SonobiBidAdapter', () => { 'cpm': 1.07, 'width': 300, 'height': 600, - 'ad': '', + 'ad': '', 'ttl': 500, 'creativeId': '1234abcd', 'netRevenue': true, @@ -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, @@ -320,7 +320,7 @@ describe('SonobiBidAdapter', () => { const response = spec.interpretResponse(bidResponse, bidRequests); response.forEach(resp => { let regx = /http:\/\/localhost:9876\/.*?(?="|$)/ - resp.ad = resp.ad.replace(regx, 'http://localhost:9876/'); + resp.ad = resp.ad.replace(regx, 'http://localhost/'); }); expect(response).to.deep.equal(prebidResponse); })