Skip to content

Commit 0840bfd

Browse files
committed
bug resolve
1 parent bcc71ce commit 0840bfd

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/app/home-page/recent-item-list/recent-item-list.component.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ import { PaginatedSearchOptions } from '../../shared/search/models/paginated-sea
1111
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
1212
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
1313
import { ViewMode } from 'src/app/core/shared/view-mode.model';
14-
14+
import { of as observableOf } from 'rxjs';
1515
describe('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

Comments
 (0)