Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coolchock committed Dec 29, 2024
1 parent db2ef3c commit 4a5c98d
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,14 @@ describe('Exercise Groups Component', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ArtemisTestModule, ExerciseGroupsComponent],
providers: [{ provide: ActivatedRoute, useValue: route }, { provide: Router, useClass: MockRouter }, MockProvider(AlertService)],
providers: [
{ provide: ActivatedRoute, useValue: route },
{ provide: Router, useClass: MockRouter },
MockProvider(AlertService),
{ provide: NgbModal, useClass: MockNgbModalService },
],
})
.overrideProvider(NgbModal, { useValue: new MockNgbModalService() })
// .overrideProvider(NgbModal, { useValue: new MockNgbModalService() })
.compileComponents()
.then(() => {
fixture = TestBed.createComponent(ExerciseGroupsComponent);
Expand All @@ -60,7 +65,7 @@ describe('Exercise Groups Component', () => {
exerciseGroupService = TestBed.inject(ExerciseGroupService);
examManagementService = TestBed.inject(ExamManagementService);
eventManager = TestBed.inject(EventManager);
modalService = TestBed.inject(NgbModal);
modalService = fixture.debugElement.injector.get(NgbModal);
alertService = TestBed.inject(AlertService);
router = TestBed.inject(Router);

Expand Down

0 comments on commit 4a5c98d

Please sign in to comment.