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:
Maurice
2026-11-30 15:21:29 +01:00
parent c84ec093d7
commit 8a888efdf0
4 changed files with 48 additions and 4 deletions
@@ -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');