From 3f99a347c04710511f2d016321108ad864e25dce Mon Sep 17 00:00:00 2001 From: David Al-Kanani Date: Tue, 31 Jul 2018 14:34:45 +0000 Subject: [PATCH] feat(amp-ads): Update Unruly loader URL --- ads/_config.js | 2 +- ads/unruly.js | 2 +- test/functional/ads/test-unruly.js | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ads/_config.js b/ads/_config.js index 495c0b46b4db5..58a6baf36b575 100644 --- a/ads/_config.js +++ b/ads/_config.js @@ -886,7 +886,7 @@ export const adConfig = { }, 'unruly': { - prefetch: 'https://video.unrulymedia.com/amp-demo/native-loader.js', + prefetch: 'https://video.unrulymedia.com/native/native-loader.js', renderStartImplemented: true, }, diff --git a/ads/unruly.js b/ads/unruly.js index 0c1d3e29e0afa..4419cf14268b3 100644 --- a/ads/unruly.js +++ b/ads/unruly.js @@ -30,5 +30,5 @@ export function unruly(global, data, scriptLoader = loadScript) { siteId: data.siteId, }; - scriptLoader(global, 'https://video.unrulymedia.com/amp-demo/native-loader.js'); + scriptLoader(global, 'https://video.unrulymedia.com/native/native-loader.js'); } diff --git a/test/functional/ads/test-unruly.js b/test/functional/ads/test-unruly.js index 3d22ab6a611f7..89f0e8e5a626e 100644 --- a/test/functional/ads/test-unruly.js +++ b/test/functional/ads/test-unruly.js @@ -51,7 +51,7 @@ describe('unruly', () => { }; unruly(mockGlobal, mockData, scriptLoader); expect(expectedGlobal).to.equal(mockGlobal); - expect(expectedUrl).to.equal('https://video.unrulymedia.com/amp-demo/native-loader.js'); + expect(expectedUrl).to.equal('https://video.unrulymedia.com/native/native-loader.js'); }); it('should throw if siteId is not provided', () => { @@ -60,9 +60,13 @@ describe('unruly', () => { const scriptLoader = () => {}; - expect( - () => unruly(mockGlobal, mockData, scriptLoader) - ).to.throw(); + allowConsoleError( + () => { + expect( + () => unruly(mockGlobal, mockData, scriptLoader) + ).to.throw(); + } + ); }); });