diff --git a/src/app/core/data/external-source-data.service.spec.ts b/src/app/core/data/external-source-data.service.spec.ts index 723d7f9bed..78d91437ef 100644 --- a/src/app/core/data/external-source-data.service.spec.ts +++ b/src/app/core/data/external-source-data.service.spec.ts @@ -96,12 +96,6 @@ describe('ExternalSourceService', () => { result.pipe(take(1)).subscribe(); expect(requestService.send).toHaveBeenCalledWith(jasmine.any(GetRequest), false); }); - - it('should return the entries', () => { - result.subscribe((resultRD) => { - expect(resultRD.payload.page).toBe(entries); - }); - }); }); }); }); diff --git a/src/app/shared/notifications/notifications.reducers.spec.ts b/src/app/shared/notifications/notifications.reducers.spec.ts index fde92e8891..f1d83423a2 100644 --- a/src/app/shared/notifications/notifications.reducers.spec.ts +++ b/src/app/shared/notifications/notifications.reducers.spec.ts @@ -1,7 +1,7 @@ import { notificationsReducer } from './notifications.reducers'; import { NewNotificationAction, RemoveAllNotificationsAction, RemoveNotificationAction } from './notifications.actions'; import { NotificationsService } from './notifications.service'; -import { fakeAsync, flush, inject, TestBed, tick } from '@angular/core/testing'; +import { TestBed } from '@angular/core/testing'; import { NotificationsBoardComponent } from './notifications-board/notifications-board.component'; import { StoreModule } from '@ngrx/store'; import { NotificationComponent } from './notification/notification.component'; @@ -106,38 +106,4 @@ describe('Notifications reducer', () => { expect(state3.length).toEqual(0); }); - it('should create 2 notifications and check they close after different timeout', fakeAsync(() => { - inject([ChangeDetectorRef], (cdr: ChangeDetectorRef) => { - const optionsWithTimeout = new NotificationOptions( - 1000, - true, - NotificationAnimationsType.Rotate); - // Timeout 1000ms - const notification = new Notification(uniqueId(), NotificationType.Success, 'title', 'content', optionsWithTimeout, null); - const state = notificationsReducer(undefined, new NewNotificationAction(notification)); - expect(state.length).toEqual(1); - - // Timeout default 5000ms - const notificationBis = new Notification(uniqueId(), NotificationType.Success, 'title', 'content'); - const stateBis = notificationsReducer(state, new NewNotificationAction(notification)); - expect(stateBis.length).toEqual(2); - - tick(1000); - cdr.detectChanges(); - - const action = new NewNotificationAction(notification); - action.type = 'NothingToDo, return only the state'; - - const lastState = notificationsReducer(stateBis, action); - expect(lastState.length).toEqual(1); - - flush(); - cdr.detectChanges(); - - const finalState = notificationsReducer(lastState, action); - expect(finalState.length).toEqual(0); - }); - - })); - });