Skip to content

Commit deb4a63

Browse files
committed
119602: Add additional accessibilitySettingsComponent tests
1 parent ec016e8 commit deb4a63

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/app/info/accessibility-settings/accessibility-settings.component.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ describe('AccessibilitySettingsComponent', () => {
5050
it('should retrieve the current settings', () => {
5151
expect(settingsService.getAll).toHaveBeenCalled();
5252
});
53+
54+
it('should convert retrieved settings to form format', () => {
55+
expect(settingsService.convertStoredValuesToFormValues).toHaveBeenCalled();
56+
});
5357
});
5458

5559
describe('saveSettings', () => {
@@ -59,6 +63,12 @@ describe('AccessibilitySettingsComponent', () => {
5963
expect(settingsService.setSettings).toHaveBeenCalled();
6064
});
6165

66+
it('should convert form settings to stored format', () => {
67+
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
68+
component.saveSettings();
69+
expect(settingsService.convertFormValuesToStoredValues).toHaveBeenCalled();
70+
});
71+
6272
it('should give the user a notification mentioning where the settings were saved', () => {
6373
settingsService.setSettings = jasmine.createSpy('setSettings').and.returnValue(of('cookie'));
6474
component.saveSettings();

0 commit comments

Comments
 (0)