From 777179ecb4e13bc08bae72c436cb17405edff8cf Mon Sep 17 00:00:00 2001 From: Michael Schock Date: Wed, 12 Apr 2017 11:15:56 -0700 Subject: [PATCH] STENCIL-3323 - Fix thumbnailImage --- helpers/thirdParty.js | 2 +- test/helpers/thirdParty.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/helpers/thirdParty.js b/helpers/thirdParty.js index 0ba7fc7c..76ee210c 100644 --- a/helpers/thirdParty.js +++ b/helpers/thirdParty.js @@ -61,7 +61,7 @@ const whitelist = [ }, { name: 'html', - include: ['ellipsis', 'sanitize', 'ul', 'ol', 'thumbnail'] + include: ['ellipsis', 'sanitize', 'ul', 'ol', 'thumbnailImage'] }, { name: 'inflection', diff --git a/test/helpers/thirdParty.js b/test/helpers/thirdParty.js index ca894ffa..aeb66f93 100644 --- a/test/helpers/thirdParty.js +++ b/test/helpers/thirdParty.js @@ -88,6 +88,26 @@ describe('third party handlebars-helpers', function() { }); }); + describe('contains thumbnailImage', function() { + it('creates a
with a thumbnail linked to an image', function(done) { + const ctxt = { + data: { + id: 'id', + alt: 'alt', + thumbnail: 'thumbnail.png', + size: { + width: 32, + height: 32 + } + } + }; + expect(c(`{{{thumbnailImage data}}}`, ctxt)).to.be + .equal('
\n\"alt\"\n
'); + + done(); + }); + }); + }); describe('inflection helpers', function() {