mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
119602: Add additional accessibilitySettingsComponent tests
This commit is contained in:
@@ -50,6 +50,10 @@ describe('AccessibilitySettingsComponent', () => {
|
||||
it('should retrieve the current settings', () => {
|
||||
expect(settingsService.getAll).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should convert retrieved settings to form format', () => {
|
||||
expect(settingsService.convertStoredValuesToFormValues).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('saveSettings', () => {
|
||||
@@ -59,6 +63,12 @@ describe('AccessibilitySettingsComponent', () => {
|
||||
expect(settingsService.setSettings).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should convert form settings to stored format', () => {
|
||||
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
|
||||
component.saveSettings();
|
||||
expect(settingsService.convertFormValuesToStoredValues).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should give the user a notification mentioning where the settings were saved', () => {
|
||||
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
|
||||
component.saveSettings();
|
||||
|
Reference in New Issue
Block a user