From 61a1647f63c2edcf6dd96b253dbfc24ed2287d28 Mon Sep 17 00:00:00 2001 From: Hannes Heine Date: Tue, 10 Aug 2021 13:42:03 +0200 Subject: [PATCH] Changed the loginApi to the expected apollo mock. --- frontend/src/views/Pages/ForgotPassword.spec.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/Pages/ForgotPassword.spec.js b/frontend/src/views/Pages/ForgotPassword.spec.js index df60568b9..b05eeb69d 100644 --- a/frontend/src/views/Pages/ForgotPassword.spec.js +++ b/frontend/src/views/Pages/ForgotPassword.spec.js @@ -1,12 +1,8 @@ import { mount, RouterLinkStub } from '@vue/test-utils' import flushPromises from 'flush-promises' -import loginAPI from '../../apis/loginAPI.js' import ForgotPassword from './ForgotPassword' -jest.mock('../../apis/loginAPI.js') - const mockAPIcall = jest.fn() -loginAPI.sendEmail = mockAPIcall const localVue = global.localVue @@ -20,6 +16,9 @@ describe('ForgotPassword', () => { $router: { push: mockRouterPush, }, + $apollo: { + query: mockAPIcall, + }, } const stubs = {