diff --git a/modules/spotxBidAdapter.js b/modules/spotxBidAdapter.js index 86a37e97e2f..bcc65c85791 100644 --- a/modules/spotxBidAdapter.js +++ b/modules/spotxBidAdapter.js @@ -379,7 +379,7 @@ export const spec = { const playersize = deepAccess(currentBidRequest, 'mediaTypes.video.playerSize'); const renderer = Renderer.install({ id: 0, - url: '/', + renderNow: true, config: { adText: 'SpotX Outstream Video Ad via Prebid.js', player_width: playersize[0][0], diff --git a/test/spec/modules/spotxBidAdapter_spec.js b/test/spec/modules/spotxBidAdapter_spec.js index 9d961657ac2..274ef60471b 100644 --- a/test/spec/modules/spotxBidAdapter_spec.js +++ b/test/spec/modules/spotxBidAdapter_spec.js @@ -442,6 +442,7 @@ describe('the spotx adapter', function () { }, bidId: 123, params: { + ad_unit: 'outstream', player_width: 400, player_height: 300, content_page_url: 'prebid.js', @@ -533,6 +534,17 @@ describe('the spotx adapter', function () { expect(responses[1].videoCacheKey).to.equal('cache124'); expect(responses[1].width).to.equal(200); }); + + it('should set the renderer attached to the bid to render immediately', function () { + var renderer = spec.interpretResponse(serverResponse, bidderRequestObj)[0].renderer, + hasRun = false; + expect(renderer._render).to.be.a('function'); + renderer._render = () => { + hasRun = true; + } + renderer.render(); + expect(hasRun).to.equal(true); + }); }); describe('outstreamRender', function() {