import { TestBed, inject } from '@angular/core/testing';\r
\r
import { HttpErrorHandlerService } from './http-error-handler.service';\r
+import { ToastrNotificationService } from './toastr-notification-service.service';\r
+\r
+class StubbedToastrNotificationService extends ToastrNotificationService {\r
+ toastrSettings() {\r
+ }\r
+}\r
\r
describe('HttpErrorHandlerService', () => {\r
beforeEach(() => {\r
TestBed.configureTestingModule({\r
- providers: [HttpErrorHandlerService]\r
+ providers: [HttpErrorHandlerService,\r
+ { provide: ToastrNotificationService, useClass: StubbedToastrNotificationService }],\r
});\r
});\r
\r
- it('should be created', inject([HttpErrorHandlerService], (service: HttpErrorHandlerService) => {\r
+ it('ErrorHandler should be created', inject([HttpErrorHandlerService], (service: HttpErrorHandlerService) => {\r
expect(service).toBeTruthy();\r
}));\r
});\r