diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-13 18:42:49 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-13 18:42:49 +0200 |
commit | a5ec4a9af4582691038ec241dfcafaa5144e5f5a (patch) | |
tree | c11fd4d60e9307fa883cd32e188ac65f206c21a6 /core/js/tests | |
parent | 2246003a3e9de98abebf03410c71dd6c03ec8e95 (diff) | |
download | nextcloud-server-a5ec4a9af4582691038ec241dfcafaa5144e5f5a.tar.gz nextcloud-server-a5ec4a9af4582691038ec241dfcafaa5144e5f5a.zip |
Move l10n functions to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/tests')
-rw-r--r-- | core/js/tests/specs/coreSpec.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js index a785cf49db8..cd7850453e1 100644 --- a/core/js/tests/specs/coreSpec.js +++ b/core/js/tests/specs/coreSpec.js @@ -274,25 +274,25 @@ describe('Core base tests', function() { }); }); describe('getCanonicalLocale', function() { - var localeStub; + var oldLocale; beforeEach(function() { - localeStub = sinon.stub(OC, 'getLocale'); + oldLocale = $('html').data('locale') }); afterEach(function() { - localeStub.restore(); + $('html').data('locale', oldLocale) }); it("Returns primary locales as is", function() { - localeStub.returns('de'); + $('html').data('locale', 'de') expect(OC.getCanonicalLocale()).toEqual('de'); - localeStub.returns('zu'); + $('html').data('locale', 'zu') expect(OC.getCanonicalLocale()).toEqual('zu'); }); it("Returns extended locales with hyphens", function() { - localeStub.returns('az_Cyrl_AZ'); + $('html').data('locale', 'az_Cyrl_AZ') expect(OC.getCanonicalLocale()).toEqual('az-Cyrl-AZ'); - localeStub.returns('de_DE'); + $('html').data('locale', 'de_DE') expect(OC.getCanonicalLocale()).toEqual('de-DE'); }); }); |