X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Finterceptor.spec.ts;h=2c44d131a29299d4d34fb226aafc2a04616a5fce;hb=17a9a74c43a344fb71bb51ad8776a21253d519f4;hp=3c35a71dd554acfa75a44afce4c25f882c4a46b5;hpb=b38d7384f7ef6571895d6d0cf89791749c33f783;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/interceptor.spec.ts b/webapp-frontend/src/app/interceptor.spec.ts index 3c35a71..2c44d13 100644 --- a/webapp-frontend/src/app/interceptor.spec.ts +++ b/webapp-frontend/src/app/interceptor.spec.ts @@ -25,12 +25,12 @@ import { } from '@angular/common/http/testing'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HttpRequestInterceptor } from './interceptor'; -import { NotificationService } from './services/ui/notification.service'; -import { EIService } from './services/ei/ei.service'; +import { NotificationService } from '@services/ui/notification.service'; +import { ProducerService } from '@services/ei/producer.service'; import { of } from 'rxjs/observable/of'; describe(`HttpRequestInterceptor`, () => { - let service: EIService; + let service: ProducerService; const notificationServiceSpy = jasmine.createSpyObj('NotificationService', [ 'error' ]); let httpMock: HttpTestingController; @@ -47,16 +47,16 @@ describe(`HttpRequestInterceptor`, () => { useClass: HttpRequestInterceptor, multi: true, }, - EIService + ProducerService ] }); - httpMock = TestBed.get(HttpTestingController); - service = TestBed.get(EIService); + httpMock = TestBed.inject(HttpTestingController); + service = TestBed.inject(ProducerService); }); it('should create', () => { - const interceptors = TestBed.get(HTTP_INTERCEPTORS); + const interceptors = TestBed.inject(HTTP_INTERCEPTORS); let found = false; interceptors.forEach(interceptor => { if (interceptor instanceof HttpRequestInterceptor) { @@ -85,7 +85,7 @@ describe(`HttpRequestInterceptor`, () => { const data = 'Invalid request parameters'; const mockErrorResponse = { status: 400, statusText: 'Bad Request' }; - httpMock.expectOne(`/ei-producer/v1/eiproducers`).flush(data, mockErrorResponse); + httpMock.expectOne(`/data-producer/v1/info-producers`).flush(data, mockErrorResponse); httpMock.verify();