From 8a2df2f8990b5aae1780f13e309637a5d3af23f9 Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 7 Dec 2021 07:28:20 +0100 Subject: [PATCH] Fixe tests of EditCreationFormular. --- .../components/EditCreationFormular.spec.js | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/admin/src/components/EditCreationFormular.spec.js b/admin/src/components/EditCreationFormular.spec.js index 22b9817f1..50704ed76 100644 --- a/admin/src/components/EditCreationFormular.spec.js +++ b/admin/src/components/EditCreationFormular.spec.js @@ -100,7 +100,18 @@ describe('EditCreationFormular', () => { }) it('sends ... to apollo', () => { - expect(apolloMutateMock).toBeCalled() + expect(apolloMutateMock).toBeCalledWith( + expect.objectContaining({ + variables: { + amount: 90, + creationDate: 'YYYY-MM-01', + email: undefined, + id: undefined, + memo: 'Test create coins', + moderator: 0, + }, + }), + ) }) }) }) @@ -124,7 +135,18 @@ describe('EditCreationFormular', () => { }) it('sends ... to apollo', () => { - expect(apolloMutateMock).toBeCalled() + expect(apolloMutateMock).toBeCalledWith( + expect.objectContaining({ + variables: { + amount: 90, + creationDate: 'YYYY-MM-01', + email: undefined, + id: undefined, + memo: 'Test create coins', + moderator: 0, + }, + }), + ) }) }) }) @@ -148,7 +170,18 @@ describe('EditCreationFormular', () => { }) it('sends ... to apollo', () => { - expect(apolloMutateMock).toBeCalled() + expect(apolloMutateMock).toBeCalledWith( + expect.objectContaining({ + variables: { + amount: 90, + creationDate: 'YYYY-MM-DD', + email: undefined, + id: undefined, + memo: 'Test create coins', + moderator: 0, + }, + }), + ) }) }) })