mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
Improve 404 navigation and styling
This commit is contained in:
parent
f6dadd8c82
commit
9291c98189
16 changed files with 160 additions and 74 deletions
|
|
@ -355,14 +355,14 @@ describe('DocumentDetailComponent', () => {
|
|||
.mockReturnValueOnce(throwError(() => new Error('unable to discard')))
|
||||
component.discard()
|
||||
fixture.detectChanges()
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'])
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
|
||||
})
|
||||
|
||||
it('should 404 on invalid id', () => {
|
||||
jest.spyOn(documentService, 'get').mockReturnValueOnce(of(null))
|
||||
const navigateSpy = jest.spyOn(router, 'navigate')
|
||||
fixture.detectChanges()
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'])
|
||||
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
|
||||
})
|
||||
|
||||
it('should support save, close and show success toast', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue