Skip to content

Commit

Permalink
clean up tests of objective
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 7, 2024
1 parent 72369bb commit 9121e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ObjectiveComponent>;
let loader: HarnessLoader;
beforeEach(() => {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/app/services/objective-menu-actions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down

0 comments on commit 9121e22

Please sign in to comment.