Fixing SO-Monitoring UI tests
[so.git] / so-monitoring / so-monitoring-ui / src / main / frontend / src / app / http-error-handler.service.spec.ts
index 0ecdf15..9be827a 100644 (file)
@@ -23,15 +23,22 @@ SPDX-License-Identifier: Apache-2.0
 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