From 12593ecb07832e0840d6c01c7e662c9e050dc0b4 Mon Sep 17 00:00:00 2001 From: franzmueller Date: Fri, 1 Dec 2023 11:30:12 +0100 Subject: [PATCH] fix tests --- src/app/modules/data/flow-repo/flow-repo.component.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/modules/data/flow-repo/flow-repo.component.spec.ts b/src/app/modules/data/flow-repo/flow-repo.component.spec.ts index f31de376..4c115414 100644 --- a/src/app/modules/data/flow-repo/flow-repo.component.spec.ts +++ b/src/app/modules/data/flow-repo/flow-repo.component.spec.ts @@ -30,6 +30,7 @@ import { FlowEngineService } from './shared/flow-engine.service'; import { By } from '@angular/platform-browser'; import { FlowModel } from './shared/flow.model'; import { of } from 'rxjs'; +import { CostService } from '../../cost/shared/cost.service'; describe('FlowRepoComponent', () => { let component: FlowRepoComponent; @@ -40,6 +41,9 @@ describe('FlowRepoComponent', () => { flowRepoServiceSpy.userHasUpdateAuthorization.and.returnValue(true); flowRepoServiceSpy.userHasReadAuthorization.and.returnValue(true); + const costServiceSpy: Spy = createSpyFromClass(CostService); + costServiceSpy.userMayGetFlowCostEstimations.and.returnValue(false); + var testFlow: FlowModel = { _id: 'string', name: "string", @@ -66,6 +70,7 @@ describe('FlowRepoComponent', () => { { provide: AuthorizationService, useClass: AuthorizationServiceMock }, { provide: FlowRepoService, useValue: flowRepoServiceSpy }, { provide: FlowEngineService, useValue: flowEngineServiceSpy }, + { provide: CostService, useValue: costServiceSpy }, DialogsService ], }).compileComponents();