mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-02 16:14:39 -05:00
Chore: fix some test warnings / errors
This commit is contained in:
parent
e312425b1c
commit
a9085c65c5
@ -158,13 +158,14 @@ describe('MailComponent', () => {
|
||||
|
||||
it('should show errors on load if load mailAccounts failure', () => {
|
||||
const toastErrorSpy = jest.spyOn(toastService, 'showError')
|
||||
jest.spyOn(mailAccountService, 'getCached').mockReturnValue(of(null))
|
||||
jest
|
||||
.spyOn(mailAccountService, 'listAll')
|
||||
.mockImplementation(() =>
|
||||
throwError(() => new Error('failed to load mail accounts'))
|
||||
)
|
||||
completeSetup(mailAccountService)
|
||||
expect(toastErrorSpy).toBeCalled()
|
||||
expect(toastErrorSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should show errors on load if load mailRules failure', () => {
|
||||
@ -175,7 +176,7 @@ describe('MailComponent', () => {
|
||||
throwError(() => new Error('failed to load mail rules'))
|
||||
)
|
||||
completeSetup(mailRuleService)
|
||||
expect(toastErrorSpy).toBeCalled()
|
||||
expect(toastErrorSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should support edit / create mail account, show error if needed', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user