diff --git a/src/app/components/project-map/project-map.component.spec.ts b/src/app/components/project-map/project-map.component.spec.ts index a8898837..4da0afb2 100644 --- a/src/app/components/project-map/project-map.component.spec.ts +++ b/src/app/components/project-map/project-map.component.spec.ts @@ -185,6 +185,7 @@ describe('ProjectMapComponent', () => { let nodesDataSource = new MockedNodesDataSource(); let linksDataSource = new MockedLinksDataSource(); let nodeCreatedLabelStylesFixer; + let mapSettingService = new MapSettingService(); beforeEach(async(() => { nodeCreatedLabelStylesFixer = { @@ -222,7 +223,7 @@ describe('ProjectMapComponent', () => { useClass: RecentlyOpenedProjectService }, { provide: NodeCreatedLabelStylesFixer, useValue: nodeCreatedLabelStylesFixer}, - { provide: MapSettingService } + { provide: MapSettingService, useValue: mapSettingService } ], declarations: [ProjectMapComponent, D3MapComponent, ...ANGULAR_MAP_DECLARATIONS], schemas: [NO_ERRORS_SCHEMA] @@ -261,4 +262,12 @@ describe('ProjectMapComponent', () => { expect(component.resetDrawToolChoice).toHaveBeenCalled(); }); + + it('should call map settings service when lock value was changed', () => { + spyOn(mapSettingService, 'changeMapLockValue'); + + component.changeLockValue(); + + expect(mapSettingService.changeMapLockValue).toHaveBeenCalled(); + }); });