mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
coverage ChangePassword.spec.js
This commit is contained in:
parent
7365aa09c1
commit
9445627480
@ -76,6 +76,22 @@ describe('ChangePassword ', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('password reset not successful', () => {
|
||||
beforeEach(() => {
|
||||
mocks.$apollo.mutate = jest.fn().mockRejectedValue({
|
||||
message: 'Ouch!',
|
||||
})
|
||||
wrapper = Wrapper()
|
||||
wrapper.find('input#password').setValue('supersecret')
|
||||
wrapper.find('input#passwordConfirmation').setValue('supersecret')
|
||||
wrapper.find('form').trigger('submit')
|
||||
})
|
||||
|
||||
it('display a toast error', () => {
|
||||
expect(mocks.$toast.error).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user