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