mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changes on the test so that the new expected objects are tested.
This commit is contained in:
parent
bd1889295d
commit
9b8f8f620f
@ -77,6 +77,9 @@ describe('ForgotPassword', () => {
|
||||
|
||||
describe('invalid Email', () => {
|
||||
beforeEach(async () => {
|
||||
mockAPIcall.mockRejectedValue({
|
||||
message: 'error',
|
||||
})
|
||||
await form.find('input').setValue('no-email')
|
||||
await flushPromises()
|
||||
})
|
||||
@ -92,13 +95,22 @@ describe('ForgotPassword', () => {
|
||||
|
||||
describe('valid Email', () => {
|
||||
beforeEach(async () => {
|
||||
mockAPIcall.mockResolvedValue({
|
||||
message: 'error',
|
||||
})
|
||||
await form.find('input').setValue('user@example.org')
|
||||
await form.trigger('submit')
|
||||
await flushPromises()
|
||||
})
|
||||
|
||||
it('calls the API', () => {
|
||||
expect(mockAPIcall).toHaveBeenCalledWith('user@example.org')
|
||||
expect(mockAPIcall).toBeCalledWith(
|
||||
expect.objectContaining({
|
||||
variables: {
|
||||
email: 'user@example.org',
|
||||
},
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('pushes "/thx/password" to the route', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user