diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js index 5237a8d63..5c8886887 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js @@ -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 = () => {