summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorClaas Augner <github@caugner.de>2018-10-24 11:17:58 +0200
committerGitHub <noreply@github.com>2018-10-24 11:17:58 +0200
commitd5e142a33653431eb2f608401e5ae0ba5e532c4c (patch)
tree18c6ae34cc73c8576edd3ef059116963b4dc289e /core
parent00b8be60f20b0f75918929c9ae569122b229e281 (diff)
downloadnextcloud-server-d5e142a33653431eb2f608401e5ae0ba5e532c4c.tar.gz
nextcloud-server-d5e142a33653431eb2f608401e5ae0ba5e532c4c.zip
OC.getCanonicalLocale: fix tests
Signed-off-by: Claas Augner <git@caugner.de>
Diffstat (limited to 'core')
-rw-r--r--core/js/tests/specs/coreSpec.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 8a867fe3228..67b7d77be6c 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -284,12 +284,16 @@ describe('Core base tests', function() {
});
it("Returns primary locales as is", function() {
- expect(OC.getCanonicalLocale('de')).toEqual('de');
- expect(OC.getCanonicalLocale('zu')).toEqual('zu');
+ localeStub.returns('de');
+ expect(OC.getCanonicalLocale()).toEqual('de');
+ localeStub.returns('zu');
+ expect(OC.getCanonicalLocale()).toEqual('zu');
});
it("Returns extended locales with hyphens", function() {
- expect(OC.getCanonicalLocale('az_Cyrl_AZ')).toEqual('az-Cyrl-AZ');
- expect(OC.getCanonicalLocale('de_DE')).toEqual('de-DE');
+ localeStub.returns('az_Cyrl_AZ');
+ expect(OC.getCanonicalLocale()).toEqual('az-Cyrl-AZ');
+ localeStub.returns('de_DE');
+ expect(OC.getCanonicalLocale()).toEqual('de-DE');
});
});
describe('Link functions', function() {