diff --git a/core/test/unit/apps/amp/amp_content_spec.js b/core/test/unit/apps/amp/amp_content_spec.js
index a47d1ed435..8d4930ff78 100644
--- a/core/test/unit/apps/amp/amp_content_spec.js
+++ b/core/test/unit/apps/amp/amp_content_spec.js
@@ -1,5 +1,6 @@
var should = require('should'),
rewire = require('rewire'),
+ nock = require('nock'),
urlUtils = require('../../../../test/utils/urlUtils'),
ampContentHelper = rewire('../../../../server/apps/amp/lib/helpers/amp_content');
@@ -117,12 +118,18 @@ describe('{{amp_content}} helper', function () {
});
it('can transform img tags to amp-img', function (done) {
+ const GIF1x1 = Buffer.from('R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==', 'base64');
+
+ nock('https://blog.ghost.org')
+ .get('/content/images/2019/06/test.jpg')
+ .reply(200, GIF1x1);
+
var testData = {
- html: '',
+ html: '',
updated_at: 'Wed Jul 27 2016 18:17:22 GMT+0200 (CEST)',
id: 1
},
- expectedResult = '',
+ expectedResult = '',
ampResult = ampContentHelper.call(testData);
ampResult.then(function (rendered) {