mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-14 21:45:37 -05:00
Chore: update to Angular 20 (#10273)
This commit is contained in:
@@ -176,22 +176,16 @@ describe('OpenDocumentsService', () => {
|
||||
OPEN_DOCUMENT_SERVICE.DOCUMENTS,
|
||||
JSON.stringify(documents)
|
||||
)
|
||||
const testOpenDocumentsService = new OpenDocumentsService(
|
||||
null,
|
||||
modalService
|
||||
)
|
||||
expect(testOpenDocumentsService.getOpenDocuments()).toHaveLength(
|
||||
openDocumentsService.load()
|
||||
expect(openDocumentsService.getOpenDocuments()).toHaveLength(
|
||||
documents.length
|
||||
)
|
||||
})
|
||||
|
||||
it('should remove open documents from localStorage on error', () => {
|
||||
sessionStorage.setItem(OPEN_DOCUMENT_SERVICE.DOCUMENTS, 'hello world')
|
||||
const testOpenDocumentsService = new OpenDocumentsService(
|
||||
null,
|
||||
modalService
|
||||
)
|
||||
expect(testOpenDocumentsService.getOpenDocuments()).toHaveLength(0)
|
||||
openDocumentsService.load()
|
||||
expect(openDocumentsService.getOpenDocuments()).toHaveLength(0)
|
||||
expect(sessionStorage.getItem(OPEN_DOCUMENT_SERVICE.DOCUMENTS)).toBeNull()
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user