[CSTPER-66] provided RequestService

This commit is contained in:
Corrado Lombardi
2020-10-22 23:41:18 +02:00
parent 8424ab89d7
commit d50d1506ef
2 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import { of as observableOf } from 'rxjs';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { DeleteCollectionPageComponent } from './delete-collection-page.component';
import { CollectionDataService } from '../../core/data/collection-data.service';
import {RequestService} from '../../core/data/request.service';
describe('DeleteCollectionPageComponent', () => {
let comp: DeleteCollectionPageComponent;
@@ -22,6 +23,7 @@ describe('DeleteCollectionPageComponent', () => {
{ provide: CollectionDataService, useValue: {} },
{ provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } },
{ provide: NotificationsService, useValue: {} },
{ provide: RequestService, useValue: {} }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();

View File

@@ -12,6 +12,7 @@ import { CommunityDataService } from '../../core/data/community-data.service';
import { CreateCommunityPageComponent } from './create-community-page.component';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
import {RequestService} from '../../core/data/request.service';
describe('CreateCommunityPageComponent', () => {
let comp: CreateCommunityPageComponent;
@@ -25,7 +26,8 @@ describe('CreateCommunityPageComponent', () => {
{ provide: CommunityDataService, useValue: { findById: () => observableOf({}) } },
{ provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } },
{ provide: Router, useValue: {} },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() }
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: RequestService, useValue: {} }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();