From f49793ec04b9c389c0c9a4463bcb34ac0c7cd0dd Mon Sep 17 00:00:00 2001 From: Jens Vannerum Date: Wed, 20 Apr 2022 17:35:51 +0200 Subject: [PATCH] 90155: Unnused import and comments --- src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts | 6 ++++++ src/app/core/data/processes/script-data.service.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts index 1a5f3e8dae..2a5a544a40 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts @@ -239,12 +239,18 @@ describe('AdminSidebarComponent', () => { })); }); + // We check that the menu section has not been called with visible set to true + // The reason why we don't check if it has been called with visible set to false + // Is because the function does not get called unless a user is authorised it('should not show the import section', () => { expect(menuService.addSection).not.toHaveBeenCalledWith(comp.menuID, jasmine.objectContaining({ id: 'import', visible: true, })); }); + // We check that the menu section has not been called with visible set to true + // The reason why we don't check if it has been called with visible set to false + // Is because the function does not get called unless a user is authorised it('should not show the export section', () => { expect(menuService.addSection).not.toHaveBeenCalledWith(comp.menuID, jasmine.objectContaining({ id: 'export', visible: true, diff --git a/src/app/core/data/processes/script-data.service.ts b/src/app/core/data/processes/script-data.service.ts index bf46427b22..aa7417bddc 100644 --- a/src/app/core/data/processes/script-data.service.ts +++ b/src/app/core/data/processes/script-data.service.ts @@ -10,7 +10,7 @@ import { HttpClient } from '@angular/common/http'; import { DefaultChangeAnalyzer } from '../default-change-analyzer.service'; import { Script } from '../../../process-page/scripts/script.model'; import { ProcessParameter } from '../../../process-page/processes/process-parameter.model'; -import { map, take, find } from 'rxjs/operators'; +import { map, take } from 'rxjs/operators'; import { URLCombiner } from '../../url-combiner/url-combiner'; import { RemoteData } from '../remote-data'; import { MultipartPostRequest, RestRequest } from '../request.models';