From 19e2436452f164a14d715e53dfa4b46a18e1d203 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 6 Dec 2021 10:59:38 +0100 Subject: [PATCH] remove verify login call --- .../components/EditCreationFormular.spec.js | 27 +------------------ admin/src/components/EditCreationFormular.vue | 12 --------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/admin/src/components/EditCreationFormular.spec.js b/admin/src/components/EditCreationFormular.spec.js index 2f29cb812..61536dab2 100644 --- a/admin/src/components/EditCreationFormular.spec.js +++ b/admin/src/components/EditCreationFormular.spec.js @@ -3,14 +3,6 @@ import EditCreationFormular from './EditCreationFormular.vue' const localVue = global.localVue -const apolloMock = jest.fn().mockResolvedValue({ - data: { - verifyLogin: { - name: 'success', - id: 0, - }, - }, -}) const apolloMutateMock = jest.fn().mockResolvedValue({ data: { updatePendingCreation: { @@ -21,6 +13,7 @@ const apolloMutateMock = jest.fn().mockResolvedValue({ }, }, }) + const stateCommitMock = jest.fn() const mocks = { @@ -35,7 +28,6 @@ const mocks = { } }), $apollo: { - query: apolloMock, mutate: apolloMutateMock, }, $store: { @@ -67,23 +59,6 @@ describe('EditCreationFormular', () => { expect(wrapper.find('.component-edit-creation-formular').exists()).toBeTruthy() }) - describe('server sends back moderator data', () => { - it('called store commit with mocked data', () => { - expect(stateCommitMock).toBeCalledWith('moderator', { name: 'success', id: 0 }) - }) - }) - - describe('server throws error for moderator data call', () => { - beforeEach(() => { - jest.clearAllMocks() - apolloMock.mockRejectedValue({ message: 'Ouch!' }) - wrapper = Wrapper() - }) - it('has called store commit with fake data', () => { - expect(stateCommitMock).toBeCalledWith('moderator', { id: 0, name: 'Test Moderator' }) - }) - }) - describe('radio buttons to selcet month', () => { it('has three radio buttons', () => { expect(wrapper.findAll('input[type="radio"]').length).toBe(3) diff --git a/admin/src/components/EditCreationFormular.vue b/admin/src/components/EditCreationFormular.vue index d3e362b5d..2b1bb566c 100644 --- a/admin/src/components/EditCreationFormular.vue +++ b/admin/src/components/EditCreationFormular.vue @@ -120,7 +120,6 @@