@@ -11,13 +11,12 @@ import { PaginatedSearchOptions } from '../../shared/search/models/paginated-sea
1111import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model' ;
1212import { SortDirection , SortOptions } from '../../core/cache/models/sort-options.model' ;
1313import { ViewMode } from 'src/app/core/shared/view-mode.model' ;
14-
14+ import { of as observableOf } from 'rxjs' ;
1515describe ( 'RecentItemListComponent' , ( ) => {
1616 let component : RecentItemListComponent ;
1717 let fixture : ComponentFixture < RecentItemListComponent > ;
1818 const emptyList = createSuccessfulRemoteDataObject ( createPaginatedList ( [ ] ) ) ;
1919 let paginationService ;
20- let searchConfigService : SearchConfigurationService ;
2120 const searchServiceStub = Object . assign ( new SearchServiceStub ( ) , {
2221 search : ( ) => observableOf ( emptyList ) ,
2322 /* eslint-disable no-empty,@typescript-eslint/no-empty-function */
@@ -60,11 +59,8 @@ describe('RecentItemListComponent', () => {
6059
6160 it ( 'should call the navigate method on the Router with view mode list parameter as a parameter when setViewMode is called' , ( ) => {
6261 component . onLoadMore ( ) ;
63- expect ( paginationService . updateRouteWithUrl ) . toHaveBeenCalledWith ( 'page-id' , [ '/search' ] , { page : 1 } , { view : ViewMode . ListElement }
64- ) ;
62+ expect ( paginationService . updateRouteWithUrl ) . toHaveBeenCalledWith ( undefined , [ 'search' ] , Object ( { sortField : 'dc.date.accessioned' , sortDirection : 'DESC' , page : 1 } ) ) ;
6563 } ) ;
6664} ) ;
67- function observableOf ( emptyList : any ) : any {
68- throw new Error ( 'Function not implemented.' ) ;
69- }
65+
7066
0 commit comments