mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
7f1d3ebc07
- move all test files from core/test to test/ - updated all imports and other references - all code inside of core/ is then application code - tests are correctly at the root level - consistent with other repos/projects Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
22 lines
686 B
JavaScript
22 lines
686 B
JavaScript
const should = require('should');
|
|
const settingsCache = require('../../../core/server/services/settings/cache');
|
|
const helpers = require('../../../core/frontend/helpers');
|
|
const proxy = require('../../../core/frontend/helpers/proxy');
|
|
|
|
describe('{{lang}} helper', function () {
|
|
beforeEach(function () {
|
|
settingsCache.set('default_locale', {value: 'en'});
|
|
});
|
|
|
|
afterEach(function () {
|
|
settingsCache.shutdown();
|
|
});
|
|
|
|
it('returns correct language tag', function () {
|
|
let expected = proxy.themeI18n.locale(),
|
|
rendered = helpers.lang.call();
|
|
|
|
should.exist(rendered);
|
|
rendered.string.should.equal(expected);
|
|
});
|
|
});
|