mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-16 03:27:59 +01:00
test: fix tests
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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: [[error:group-name-too-long]] on NodeBB Upgrade]]';
|
||||
return translator.translate(key).then((translated) => {
|
||||
assert.strictEqual(translated, '<strong>test1</strong> upvoted your post in <br/><strong>error: Error: [[error:group-name-too-long]] on NodeBB Upgrade</strong>');
|
||||
assert.strictEqual(translated, '<strong>test1</strong> upvoted your post in <strong>error: Error: [[error:group-name-too-long]] on NodeBB Upgrade</strong>');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user