0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Removed empty cancellation reason from alert template

refs https://github.com/TryGhost/Team/issues/1826
This commit is contained in:
Rishabh 2022-08-26 01:48:47 +05:30
parent 4718171b1d
commit fbac9689c9
2 changed files with 8 additions and 0 deletions

View file

@ -158,12 +158,14 @@
<p style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; padding-right: 8px; padding: 0; margin: 0; color: #15171A; font-weight: 600;">{{subscriptionData.expiryAt}}</p>
</td>
</tr>
{{#if subscriptionData.cancellationReason}}
<tr>
<td style="vertical-align: top; padding-top: 0; padding-right: 16px; padding-bottom: 16px; padding-left: 16px;">
<p style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 13px; padding-right: 8px; padding: 0; margin: 0; color: #95A1AD;">Cancellation reason</p>
<p style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; padding-right: 8px; padding: 0; margin: 0; color: #15171A; font-weight: 400;">{{subscriptionData.cancellationReason}}</p>
</td>
</tr>
{{/if}}
</tbody>
</table>

View file

@ -366,6 +366,9 @@ describe('StaffService', function () {
mailStub.calledWith(
sinon.match.has('html', sinon.match('Reason: Changed my mind! - '))
).should.be.true();
mailStub.calledWith(
sinon.match.has('html', sinon.match('Cancellation reason'))
).should.be.true();
});
it('sends paid subscription cancel alert without reason', async function () {
@ -389,6 +392,9 @@ describe('StaffService', function () {
mailStub.calledWith(
sinon.match.has('html', sinon.match('Reason: '))
).should.be.false();
mailStub.calledWith(
sinon.match.has('html', sinon.match('Cancellation reason'))
).should.be.false();
});
});
});