mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
fix(journey): the digest of a protected link names no entry
A follower keeps getting the daily mail after the owner puts a password on the link or changes it, so the mail named titles, dates and places the password was meant to guard. For a link behind a password the digest now only says there is something new and links to the journey.
This commit is contained in:
@@ -114,6 +114,13 @@ describe('the mails of a follower', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('JSOCIAL-HELP-014: a digest without entries only says there is something new, without a dangling colon', () => {
|
||||
const en = digestMail('en', 'Azores', [], { link: 'tok', unsubscribe: 'u' });
|
||||
expect(en.body).toBe('There is something new to read in "Azores"');
|
||||
expect(en.cta.href).toMatch(/\/public\/journey\/tok$/);
|
||||
expect(digestMail('ja', 'Azores', [], { link: 'tok', unsubscribe: 'u' }).body).not.toMatch(/[::]$/);
|
||||
});
|
||||
|
||||
it('JSOCIAL-HELP-012: a follower language is one the app ships, else English', () => {
|
||||
expect(subscriberLocale('fr')).toBe('fr');
|
||||
expect(subscriberLocale('klingon')).toBe('en');
|
||||
|
||||
Reference in New Issue
Block a user