Skip to content

Commit

Permalink
remove hardcoded localhost port for tests (prebid#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and dluxemburg committed Jul 17, 2018
1 parent df913b8 commit 37ce2e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion test/spec/modules/nanointeractiveBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { expect } from 'chai';
import * as utils from 'src/utils';

import {
ALG,
BIDDER_CODE, CATEGORY, DATA_PARTNER_ID, DATA_PARTNER_PIXEL_ID, ENGINE_BASE_URL, NQ, NQ_NAME, SECURITY,
Expand Down Expand Up @@ -44,7 +46,7 @@ describe('nanointeractive adapter tests', function () {
[NQ]: [SEARCH_QUERY, null],
sizes: [WIDTH + 'x' + HEIGHT],
bidId: '24a1c9ec270973',
cors: 'http://localhost:9876'
cors: 'http://localhost'
};

function getSingleBidResponse(isValid) {
Expand Down Expand Up @@ -84,10 +86,14 @@ describe('nanointeractive adapter tests', function () {
expect(nanoBidAdapter.isBidRequestValid(getBid(false))).to.equal(false);
});
it('Test buildRequests()', function () {
let stub = sinon.stub(utils, 'getOrigin', () => 'http://localhost');

let request = nanoBidAdapter.buildRequests([getBid(true)]);
expect(request.method).to.equal('POST');
expect(request.url).to.equal(ENGINE_BASE_URL);
expect(request.data).to.equal(JSON.stringify([SINGlE_BID_REQUEST]));

stub.restore();
});
it('Test interpretResponse() length', function () {
let bids = nanoBidAdapter.interpretResponse([getSingleBidResponse(true), getSingleBidResponse(false)]);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/readpeakBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('ReadPeakAdapter', () => {
},
'id': '11bc5dd5-7421-4dd8-c926-40fa653bec76',
'ref': '',
'page': 'http://localhost:9876/?id=48509002',
'page': 'http://localhost',
'domain': 'localhost'
},
'app': null,
Expand Down

0 comments on commit 37ce2e4

Please sign in to comment.