Fix tests in 'AvatarUploader.spec.js'

This commit is contained in:
Wolfgang Huß 2022-09-18 18:47:21 +02:00
parent 6f6dc4e7fd
commit 8da2d1102f

View File

@ -29,6 +29,7 @@ describe('AvatarUploader', () => {
profile: { profile: {
avatar: { url: '/api/generic.jpg' }, avatar: { url: '/api/generic.jpg' },
}, },
updateMutation: jest.fn(),
} }
beforeEach(() => { beforeEach(() => {
@ -40,7 +41,7 @@ describe('AvatarUploader', () => {
jest.clearAllMocks() jest.clearAllMocks()
}) })
it('sends a the UpdateUser mutation when vddrop is called', () => { it('sends the UpdateUser mutation when vddrop is called', () => {
wrapper.vm.vddrop([{ filename: 'avatar.jpg' }]) wrapper.vm.vddrop([{ filename: 'avatar.jpg' }])
expect(mocks.$apollo.mutate).toHaveBeenCalledTimes(1) expect(mocks.$apollo.mutate).toHaveBeenCalledTimes(1)
}) })