mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changed the loginApi to the expected apollo mock.
This commit is contained in:
parent
f3e815eb91
commit
61a1647f63
@ -1,12 +1,8 @@
|
|||||||
import { mount, RouterLinkStub } from '@vue/test-utils'
|
import { mount, RouterLinkStub } from '@vue/test-utils'
|
||||||
import flushPromises from 'flush-promises'
|
import flushPromises from 'flush-promises'
|
||||||
import loginAPI from '../../apis/loginAPI.js'
|
|
||||||
import ForgotPassword from './ForgotPassword'
|
import ForgotPassword from './ForgotPassword'
|
||||||
|
|
||||||
jest.mock('../../apis/loginAPI.js')
|
|
||||||
|
|
||||||
const mockAPIcall = jest.fn()
|
const mockAPIcall = jest.fn()
|
||||||
loginAPI.sendEmail = mockAPIcall
|
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
@ -20,6 +16,9 @@ describe('ForgotPassword', () => {
|
|||||||
$router: {
|
$router: {
|
||||||
push: mockRouterPush,
|
push: mockRouterPush,
|
||||||
},
|
},
|
||||||
|
$apollo: {
|
||||||
|
query: mockAPIcall,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const stubs = {
|
const stubs = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user