mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 01:40:21 +03:00
35e3e0708c
- The proxy is not a helper, we want the helpers folder to only include helpers - The proxy is also meant to be the interface to Ghost for the helpers, and we want to enforce that - This is a small step on the way
23 lines
687 B
JavaScript
23 lines
687 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('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);
|
|
});
|
|
});
|