mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
c4dff2d50e
refs #10318
refs 2614565d5a
- Renames default_locale settings key as introduced in referenced
migration
23 lines
677 B
JavaScript
23 lines
677 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/services/proxy');
|
|
|
|
describe('{{lang}} helper', function () {
|
|
beforeEach(function () {
|
|
settingsCache.set('lang', {value: 'en'});
|
|
});
|
|
|
|
afterEach(function () {
|
|
settingsCache.shutdown();
|
|
});
|
|
|
|
it('returns correct language tag', function () {
|
|
let expected = proxy.themeI18n.locale();
|
|
let rendered = helpers.lang.call();
|
|
|
|
should.exist(rendered);
|
|
rendered.string.should.equal(expected);
|
|
});
|
|
});
|