This commit is contained in:
ogerly 2022-09-06 11:22:33 +02:00
parent dfa97fd855
commit 3ec2fd8e0d

View File

@ -14,21 +14,23 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
id: 1, id: 1,
firstName: 'Bibi', firstName: 'Bibi',
lastName: 'Bloxberg', lastName: 'Bloxberg',
userId: 99,
email: 'bibi@bloxberg.de', email: 'bibi@bloxberg.de',
amount: 500, amount: 500,
memo: 'Danke für alles', memo: 'Danke für alles',
date: new Date(), date: new Date(),
moderator: 2, moderator: 1,
}, },
{ {
id: 2, id: 2,
firstName: 'Räuber', firstName: 'Räuber',
lastName: 'Hotzenplotz', lastName: 'Hotzenplotz',
userId: 100,
email: 'raeuber@hotzenplotz.de', email: 'raeuber@hotzenplotz.de',
amount: 1000000, amount: 1000000,
memo: 'Gut Ergattert', memo: 'Gut Ergattert',
date: new Date(), date: new Date(),
moderator: 2, moderator: 1,
}, },
], ],
}, },
@ -41,6 +43,15 @@ const mocks = {
$d: jest.fn((d) => d), $d: jest.fn((d) => d),
$store: { $store: {
commit: storeCommitMock, commit: storeCommitMock,
state: {
moderator: {
firstName: 'Peter',
lastName: 'Lustig',
isAdmin: '2022-08-30T07:41:31.000Z',
id: 263,
language: 'de',
},
},
}, },
$apollo: { $apollo: {
query: apolloQueryMock, query: apolloQueryMock,