Skip to content

Commit 090ce95

Browse files
[duracom-383] fix test
1 parent 8917ec7 commit 090ce95

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ let typesSelection;
7171
let scriptDataService;
7272
let router;
7373
let scriptService;
74-
let notificationService: NotificationsServiceStub;
7574

76-
describe('ItemDeleteComponent', () => {
75+
fdescribe('ItemDeleteComponent', () => {
7776
beforeEach(waitForAsync(() => {
78-
notificationService = new NotificationsServiceStub();
7977
scriptService = jasmine.createSpyObj('scriptService', {
8078
invoke: createSuccessfulRemoteDataObject$({ processId: '123' }),
8179
});
@@ -207,7 +205,6 @@ describe('ItemDeleteComponent', () => {
207205
beforeEach(() => {
208206
fixture = TestBed.createComponent(ItemDeleteComponent);
209207
comp = fixture.componentInstance;
210-
expect(comp['router']).toBe(router);
211208
fixture.detectChanges();
212209
});
213210

@@ -241,8 +238,8 @@ describe('ItemDeleteComponent', () => {
241238
scriptDataService.invoke.and.returnValue(createFailedRemoteDataObject$('Error', 500));
242239
comp.performAction();
243240
setTimeout(() => {
244-
expect(comp['notificationsService'].error).toHaveBeenCalled();
245-
expect(comp['router'].navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem)]);
241+
expect(notificationsServiceStub.error).toHaveBeenCalled();
242+
expect(router.navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem)]);
246243
done();
247244
}, 0);
248245
});

0 commit comments

Comments
 (0)