mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-9112] Included a output event on change of language (#7697)
This commit is contained in:
@@ -108,4 +108,14 @@ describe('LanguageMenuComponent', () => {
|
||||
component.changeLanguage(languages[1]);
|
||||
expect(spy.calls.mostRecent().args[0]).toBe('textOrientation', 'ltr');
|
||||
});
|
||||
|
||||
it('should emit changedLanguage event with language details', () => {
|
||||
const changedLanguageSpy = spyOn(component.changedLanguage, 'emit');
|
||||
appConfig.config.languages = languages;
|
||||
userPreferencesService.locale = 'fake-key-3';
|
||||
fixture.detectChanges();
|
||||
|
||||
component.changeLanguage(languages[2]);
|
||||
expect(changedLanguageSpy).toHaveBeenCalledWith(languages[2]);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user