fix(server): set default doc title to Untitled on email (#11152)

close CLOUD-181
This commit is contained in:
fengmk2
2025-03-25 12:58:43 +00:00
parent 27d07a6e24
commit ad4e1ed7de
4 changed files with 102 additions and 1 deletions
@@ -1,6 +1,7 @@
import test from 'ava';
import { Renderers } from '../mails';
import { TEST_DOC, TEST_USER } from '../mails/common';
test('should render emails', async t => {
for (const render of Object.values(Renderers)) {
@@ -9,3 +10,14 @@ test('should render emails', async t => {
t.snapshot(content.html, content.subject);
}
});
test('should render mention email with empty doc title', async t => {
const content = await Renderers.Mention({
user: TEST_USER,
doc: {
...TEST_DOC,
title: '',
},
});
t.snapshot(content.html, content.subject);
});