diff --git a/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js b/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js index 2f6cfbc5..f097c52c 100644 --- a/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js +++ b/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js @@ -50,7 +50,7 @@ describe('localeswitcher/LocaleSwitcher.vue', () => { it('has correct default data', () => { expect(typeof LocaleSwitcher.data).to.equal('function'); expect(vm.lang).to.be.an('object'); - expect(Object.keys(vm.lang).length).to.eql(2); + expect(Object.keys(vm.lang).length).to.eql(3); expect(vm.lang.en).to.eql('English'); expect(vm.lang.de).to.eql('Deutsch'); expect(vm.lang.pt).to.eql('Portugues'); diff --git a/tests/unit/specs/util/Locale.spec.js b/tests/unit/specs/util/Locale.spec.js index 4deaa6f0..b557a173 100644 --- a/tests/unit/specs/util/Locale.spec.js +++ b/tests/unit/specs/util/Locale.spec.js @@ -7,7 +7,7 @@ const appConfig = { de: 'Deutsch', pt: 'Portugues' }, - fallback: 'pt' + fallback: 'de' } }; @@ -29,11 +29,10 @@ describe('LocaleUtil', () => { it('getSupportedLanguages returns correct languages', () => { const supported = LocaleUtil.getSupportedLanguages(appConfig); expect(supported).to.be.an('object'); - expect(Object.keys(supported).length).to.eql(2); + expect(Object.keys(supported).length).to.eql(3); expect(supported.en).to.eql('English'); expect(supported.de).to.eql('Deutsch'); expect(supported.pt).to.eql('Portugues'); - }); it('getSupportedLanguages returns correct fallback language when lang is unconfigured', () => { @@ -55,12 +54,13 @@ describe('LocaleUtil', () => { it('isLanguageSupported returns correct results', () => { const enSupported = LocaleUtil.isLanguageSupported('en', appConfig); - const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig); const deSupported = LocaleUtil.isLanguageSupported('de', appConfig); const frSupported = LocaleUtil.isLanguageSupported('fr', appConfig); + const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig); expect(enSupported).to.be.true; expect(deSupported).to.be.true; expect(frSupported).to.be.false; + expect(ptSupported).to.be.true; }); it('isLanguageSupported returns correct results when lang is unconfigured', () => {