mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changed the loginAPI mock to the apollo mock.
This commit is contained in:
parent
cc30b02389
commit
4531eb15cb
@ -1,22 +1,15 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import UserCardFormUserData from './UserCard_FormUserData'
|
||||
import loginAPI from '../../../apis/loginAPI'
|
||||
import flushPromises from 'flush-promises'
|
||||
|
||||
jest.mock('../../../apis/loginAPI')
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
const mockAPIcall = jest.fn((args) => {
|
||||
return { success: true }
|
||||
})
|
||||
const mockAPIcall = jest.fn()
|
||||
|
||||
const toastErrorMock = jest.fn()
|
||||
const toastSuccessMock = jest.fn()
|
||||
const storeCommitMock = jest.fn()
|
||||
|
||||
loginAPI.updateUserInfos = mockAPIcall
|
||||
|
||||
describe('UserCard_FormUsername', () => {
|
||||
let wrapper
|
||||
|
||||
@ -36,6 +29,9 @@ describe('UserCard_FormUsername', () => {
|
||||
success: toastSuccessMock,
|
||||
error: toastErrorMock,
|
||||
},
|
||||
$apollo: {
|
||||
query: mockAPIcall,
|
||||
},
|
||||
}
|
||||
|
||||
const Wrapper = () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user