Skip to content

Commit

Permalink
Add test to verify navigation behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
NereusWB922 committed Mar 14, 2024
1 parent eaf9d62 commit 8b49cae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/services/phase.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,17 @@ describe('PhaseService', () => {
});

describe('changePhase(Phase)', () => {
it('should set current phase', () => {
it('should set current phase and redirect with current phase and repo', () => {
phaseService.setRepository(WATCHER_REPO);

expect(phaseService.currentPhase).toEqual(Phase.issuesViewer);

phaseService.changePhase(Phase.activityDashboard);

expect(phaseService.currentPhase).toEqual(Phase.activityDashboard);
expect(routerSpy.navigate).toHaveBeenCalledWith([Phase.activityDashboard], {
queryParams: { repo: WATCHER_REPO.toString() }
});
});
});

Expand Down

0 comments on commit 8b49cae

Please sign in to comment.