diff --git a/frontend/src/app/components/objective/objective.component.spec.ts b/frontend/src/app/components/objective/objective.component.spec.ts index c02c8806e7..ab4cf621a7 100644 --- a/frontend/src/app/components/objective/objective.component.spec.ts +++ b/frontend/src/app/components/objective/objective.component.spec.ts @@ -31,16 +31,11 @@ const overviewServiceMock = { }; const objectiveServiceMock = { - getFullObjective(objectiveMin: ObjectiveMin) { - let ongoingObjective = objective; - ongoingObjective.state = State.ONGOING; - return of(ongoingObjective); - }, + getFullObjective: jest.fn(), }; + describe('ObjectiveColumnComponent', () => { let component: ObjectiveComponent; - let bum: ObjectiveMenuActions; - let bam: ObjectiveMenuActionsService; let fixture: ComponentFixture; let loader: HarnessLoader; beforeEach(() => { diff --git a/frontend/src/app/services/objective-menu-actions.service.ts b/frontend/src/app/services/objective-menu-actions.service.ts index 51ea9cd237..5dd1c2b285 100644 --- a/frontend/src/app/services/objective-menu-actions.service.ts +++ b/frontend/src/app/services/objective-menu-actions.service.ts @@ -46,8 +46,7 @@ export class ObjectiveMenuActionsService { } else if (objective.state === State.DRAFT) { return this.getDraftMenuActions(objective); } - //Probably throw an error here - return []; + throw new Error('Objective invalid'); } private getDefaultActions(objective: ObjectiveMin): ObjectiveMenuEntry[] {