@@ -12,7 +12,6 @@ import { HALEndpointService } from '../../core/shared/hal-endpoint.service';
1212import { DSONameService } from '../../core/breadcrumbs/dso-name.service' ;
1313import { getMockRequestService } from '../mocks/request.service.mock' ;
1414import { getMockRemoteDataBuildService } from '../mocks/remote-data-build.service.mock' ;
15- import { SearchDataImpl } from '../../core/data/base/search-data' ;
1615import { NotificationsServiceStub } from '../testing/notifications-service.stub' ;
1716import { HALEndpointServiceStub } from '../testing/hal-endpoint-service.stub' ;
1817import { createPaginatedList } from '../testing/utils.test' ;
@@ -22,7 +21,6 @@ describe('SubscriptionsDataService', () => {
2221
2322
2423 let service : SubscriptionsDataService ;
25- let searchData : SearchDataImpl < Subscription > ;
2624
2725 let comparator : DSOChangeAnalyzer < Subscription > ;
2826 let http : HttpClient ;
@@ -121,11 +119,11 @@ describe('SubscriptionsDataService', () => {
121119 } ) ;
122120
123121 it ( 'should get the subscriptions' , ( ) => {
122+ spyOn ( ( service as any ) . searchData , 'searchBy' ) ;
124123 const id = 'test-id' ;
125124 const ePersonId = 'test-ePersonId' ;
126- service . getSubscriptionsByPersonDSO ( ePersonId , id ) . subscribe ( ( ) => {
127- expect ( searchData . searchBy ) . toHaveBeenCalled ( ) ;
128- } ) ;
125+ service . getSubscriptionsByPersonDSO ( ePersonId , id ) ;
126+ expect ( ( service as any ) . searchData . searchBy ) . toHaveBeenCalled ( ) ;
129127 } ) ;
130128
131129 } ) ;
0 commit comments