From e05889cd53fa3b192701dba06d09322ed4da65be Mon Sep 17 00:00:00 2001 From: Rishabh Garg Date: Thu, 13 Oct 2022 13:42:21 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20missing=20accent=20color?= =?UTF-8?q?=20for=20default=20content=20cta=20(#15611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Casper/issues/901 - the site accent color property on default cta for upgrade link had a typo and was using wrong property --- ghost/core/core/frontend/helpers/tpl/content-cta.hbs | 2 +- .../core/test/unit/frontend/helpers/content.test.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/frontend/helpers/tpl/content-cta.hbs b/ghost/core/core/frontend/helpers/tpl/content-cta.hbs index e03c10cb8a..643c11e9a5 100644 --- a/ghost/core/core/frontend/helpers/tpl/content-cta.hbs +++ b/ghost/core/core/frontend/helpers/tpl/content-cta.hbs @@ -11,7 +11,7 @@

This {{#is "page"}}page{{else}}post{{/is}} is for subscribers on the {{tiers}} only

{{/has}} {{#if @member}} - Upgrade your account + Upgrade your account {{else}} Subscribe now

Already have an account? Sign in

diff --git a/ghost/core/test/unit/frontend/helpers/content.test.js b/ghost/core/test/unit/frontend/helpers/content.test.js index 53d63558f8..c5bcdf514f 100644 --- a/ghost/core/test/unit/frontend/helpers/content.test.js +++ b/ghost/core/test/unit/frontend/helpers/content.test.js @@ -150,6 +150,18 @@ describe('{{content}} helper with no access', function () { rendered.string.should.containEql('"background-color: #abcdef"'); rendered.string.should.containEql('This page is for'); }); + + it('can render default template for upgrade case', function () { + // html will be included when there is free content available + const html = 'Free content'; + optionsData.data.member = { + id: '123' + }; + const rendered = content.call({html: html, access: false, visibility: 'members'}, optionsData); + rendered.string.should.containEql('Free content'); + rendered.string.should.containEql('Upgrade your account'); + rendered.string.should.containEql('color:#abcdef'); + }); }); describe('{{content}} helper with custom template', function () {