X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=so-monitoring%2Fso-monitoring-ui%2Fsrc%2Fmain%2Ffrontend%2Fsrc%2Fapp%2Fhttp-error-handler.service.spec.ts;h=9be827a69d8d70297cbfbce0683c5cc9092e8d7e;hb=19ca704576ea511935f7bb5d41e49886ce9a097c;hp=0ecdf15d9e02f76b4b4e4a7c0cbaf456688f1311;hpb=15fdcda8aef5b8b698cd0a3d86eeaec5937c7bc6;p=so.git diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts index 0ecdf15d9e..9be827a69d 100644 --- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/http-error-handler.service.spec.ts @@ -23,15 +23,22 @@ SPDX-License-Identifier: Apache-2.0 import { TestBed, inject } from '@angular/core/testing'; import { HttpErrorHandlerService } from './http-error-handler.service'; +import { ToastrNotificationService } from './toastr-notification-service.service'; + +class StubbedToastrNotificationService extends ToastrNotificationService { + toastrSettings() { + } +} describe('HttpErrorHandlerService', () => { beforeEach(() => { TestBed.configureTestingModule({ - providers: [HttpErrorHandlerService] + providers: [HttpErrorHandlerService, + { provide: ToastrNotificationService, useClass: StubbedToastrNotificationService }], }); }); - it('should be created', inject([HttpErrorHandlerService], (service: HttpErrorHandlerService) => { + it('ErrorHandler should be created', inject([HttpErrorHandlerService], (service: HttpErrorHandlerService) => { expect(service).toBeTruthy(); })); });