test: fix tests

This commit is contained in:
Barış Soner Uşaklı
2026-02-05 21:53:39 -05:00
parent 89f8ce68c3
commit 0d19294a17
2 changed files with 4 additions and 4 deletions

View File

@@ -1171,7 +1171,7 @@ describe('Controllers', () => {
assert.equal(response.statusCode, 200);
assert(body);
const notif = body.notifications[0];
assert.equal(notif.bodyShort, '<strong>test1</strong> replied in <br/><strong>test2</strong>');
assert.equal(notif.bodyShort, '<strong>test1</strong> posted a reply in <strong>test2</strong>');
assert.equal(notif.bodyLong, notifData.bodyLong);
assert.equal(notif.pid, notifData.pid);
assert.equal(notif.path, nconf.get('relative_path') + notifData.path);

View File

@@ -126,7 +126,7 @@ describe('new Translator(language)', () => {
const translator = Translator.create('en-GB');
return translator.translate('[[notifications:user-posted-to, [[global:guest]], My Topic]]').then((translated) => {
assert.strictEqual(translated, '<strong>Guest</strong> replied in <br/><strong>My Topic</strong>');
assert.strictEqual(translated, '<strong>Guest</strong> posted a reply in <strong>My Topic</strong>');
});
});
@@ -134,7 +134,7 @@ describe('new Translator(language)', () => {
const translator = Translator.create('en-GB');
return translator.translate('[[notifications:user-posted-to, [[global:guest]], [[global:guest]]]]').then((translated) => {
assert.strictEqual(translated, '<strong>Guest</strong> replied in <br/><strong>Guest</strong>');
assert.strictEqual(translated, '<strong>Guest</strong> posted a reply in <strong>Guest</strong>');
});
});
@@ -178,7 +178,7 @@ describe('new Translator(language)', () => {
const key = '[[notifications:upvoted-your-post-in, test1, error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade]]';
return translator.translate(key).then((translated) => {
assert.strictEqual(translated, '<strong>test1</strong> upvoted your post in <br/><strong>error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade</strong>');
assert.strictEqual(translated, '<strong>test1</strong> upvoted your post in <strong>error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade</strong>');
});
});