mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
coverage PasswordReset/Request.spec.js
This commit is contained in:
parent
fc176e28a4
commit
0e6893eeb3
@ -95,5 +95,20 @@ describe('Request', () => {
|
||||
expect(mocks.$apollo.mutate).toHaveBeenCalledWith(expected)
|
||||
})
|
||||
})
|
||||
|
||||
describe('backend throws an error', () => {
|
||||
beforeEach(() => {
|
||||
mocks.$apollo.mutate = jest.fn().mockRejectedValue({
|
||||
message: 'Ouch!',
|
||||
})
|
||||
wrapper = Wrapper()
|
||||
wrapper.find('input#email').setValue('mail@gmail.com')
|
||||
wrapper.find('form').trigger('submit')
|
||||
})
|
||||
|
||||
it('display a toast error', () => {
|
||||
expect(mocks.$toast.error).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user