reset pagination on data source change (#2443)

This commit is contained in:
Denys Vuika
2017-10-06 12:22:03 +01:00
committed by Eugenio Romano
parent bdd26e6c42
commit 100479f017
2 changed files with 13 additions and 1 deletions

View File

@@ -972,4 +972,11 @@ describe('DocumentList', () => {
expect(documentList.reload).toHaveBeenCalledTimes(2);
});
it('should reset pagination when switching sources', () => {
spyOn(documentList, 'resetPagination').and.callThrough();
documentList.loadFolderByNodeId('-trashcan-');
documentList.loadFolderByNodeId('-sites-');
expect(documentList.resetPagination).toHaveBeenCalledTimes(2);
});
});