fixed pagination test

This commit is contained in:
Lotte Hofstede
2018-04-05 16:34:49 +02:00
parent d5114a87da
commit e6b4381f45

View File

@@ -271,7 +271,7 @@ describe('Pagination component', () => {
changePage(testFixture, 3); changePage(testFixture, 3);
tick(); tick();
expect(routerStub.navigate).toHaveBeenCalledWith([], { queryParams: { pageId: 'test', page: 3, pageSize: 10, sortDirection: 'ASC', sortField: 'dc.title' } }); expect(routerStub.navigate).toHaveBeenCalledWith([], { queryParams: { pageId: 'test', page: 3, pageSize: 10, sortDirection: 'ASC', sortField: 'dc.title' }, queryParamsHandling: 'merge' });
})); }));
@@ -282,7 +282,7 @@ describe('Pagination component', () => {
changePageSize(testFixture, '20'); changePageSize(testFixture, '20');
tick(); tick();
expect(routerStub.navigate).toHaveBeenCalledWith([], { queryParams: { pageId: 'test', page: 1, pageSize: 20, sortDirection: 'ASC', sortField: 'dc.title' } }); expect(routerStub.navigate).toHaveBeenCalledWith([], { queryParams: { pageId: 'test', page: 1, pageSize: 20, sortDirection: 'ASC', sortField: 'dc.title' } , queryParamsHandling: 'merge' });
})); }));
it('should set correct values', fakeAsync(() => { it('should set correct values', fakeAsync(() => {