use new email template when joining a group plan for customisation of subscription cancellation information (#8637)

* use new email template when subscription is cancelled from joining a group plan

* use new email template when subscription is cancelled from joining a group plan - needs more code, tests

* change from sending new email as a cancel-subscription option to sending as a group plan join email

Uses a new group-member-join email template instead of old group-member-joining because new template includes mandril conditional merge tags.

Also adds tests and comments. Edits some comments for accuracy and typo fixes.

* adapt group-member-join email template for manual cancel message for iOS and Android subscriptions

* save test user so its profile name can be read by calls to sendTxn

* add documentation for the user model cancelSubscription function

* add constants for strings passed to mandrill email templates
This commit is contained in:
Alys
2017-06-07 10:25:37 -07:00
committed by Sabe Jones
parent 2292ba2694
commit 613f51b08d
11 changed files with 289 additions and 27 deletions

View File

@@ -16,6 +16,7 @@ describe('payments/index', () => {
beforeEach(async () => {
user = new User();
user.profile.name = 'sender';
await user.save();
group = generateGroup({
name: 'test group',