mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
add failing test for #4141
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*global require*/
|
/*global require*/
|
||||||
|
|
||||||
var assert = require('assert'),
|
var assert = require('assert');
|
||||||
db = require('./mocks/databasemock'),
|
var translator = require('../public/src/modules/translator.js');
|
||||||
translator = require('../public/src/modules/translator.js');
|
|
||||||
|
|
||||||
|
|
||||||
describe('Translator', function(){
|
describe('Translator', function(){
|
||||||
@@ -84,6 +83,14 @@ describe('Translator', function(){
|
|||||||
assert.strictEqual(translated, 'Perhaps you should <a href=\'<strong>test</strong>/login\'>try logging in</a>?');
|
assert.strictEqual(translated, 'Perhaps you should <a href=\'<strong>test</strong>/login\'>try logging in</a>?');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
it('should translate titles with ampersand properly', function(done) {
|
||||||
|
var key = '[[topic:composer.replying_to, "Discussion: NodeBB Plugins & Themes section"]]';
|
||||||
|
translator.translate(key, function(translated) {
|
||||||
|
assert.strictEqual(translated, 'Replying to "Discussion: NodeBB Plugins & Themes section"');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user