From 5a1b82d93cd2cc58c145426e319f0cd853798b45 Mon Sep 17 00:00:00 2001 From: Samuel Date: Wed, 8 Jul 2020 13:45:53 +0200 Subject: [PATCH] fix #630 Item delete broken - repair tests --- .../process-page/form/process-form.component.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/process-page/form/process-form.component.spec.ts b/src/app/process-page/form/process-form.component.spec.ts index 12326111da..5e27ff3de4 100644 --- a/src/app/process-page/form/process-form.component.spec.ts +++ b/src/app/process-page/form/process-form.component.spec.ts @@ -19,6 +19,7 @@ describe('ProcessFormComponent', () => { let component: ProcessFormComponent; let fixture: ComponentFixture; let scriptService; + let router; let parameterValues; let script; @@ -41,7 +42,10 @@ describe('ProcessFormComponent', () => { } }) } - ) + ); + router = { + navigateByUrl: () => undefined, + }; } beforeEach(async(() => { @@ -59,8 +63,8 @@ describe('ProcessFormComponent', () => { providers: [ { provide: ScriptDataService, useValue: scriptService }, { provide: NotificationsService, useClass: NotificationsServiceStub }, - { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeBySubstring']) }, - { provide: Router, useValue: {} }, + { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, + { provide: Router, useValue: router }, ], schemas: [NO_ERRORS_SCHEMA] })