adopt unit tests to changes in factory

This commit is contained in:
Moriz Wahl 2022-12-12 14:38:56 +01:00
parent 06b5fa4295
commit 35c392bbae

View File

@ -969,13 +969,21 @@ describe('AdminResolver', () => {
const now = new Date()
beforeAll(async () => {
creation = await creationFactory(testEnv, {
email: 'peter@lustig.de',
amount: 400,
memo: 'Herzlich Willkommen bei Gradido!',
creationDate: contributionDateFormatter(
new Date(now.getFullYear(), now.getMonth() - 1, 1),
),
await mutate({
mutation: adminCreateContribution,
variables: {
email: 'peter@lustig.de',
amount: 400,
memo: 'Herzlich Willkommen bei Gradido!',
creationDate: contributionDateFormatter(
new Date(now.getFullYear(), now.getMonth() - 1, 1),
),
},
})
creation = await Contribution.findOneOrFail({
where: {
memo: 'Herzlich Willkommen bei Gradido!',
},
})
})
@ -1702,6 +1710,10 @@ describe('AdminResolver', () => {
new Date(now.getFullYear(), now.getMonth() - 2, 1),
),
})
await query({
query: login,
variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
})
})
it('returns true', async () => {
@ -1782,6 +1794,10 @@ describe('AdminResolver', () => {
new Date(now.getFullYear(), now.getMonth() - 2, 1),
),
})
await query({
query: login,
variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
})
})
// In the futrue this should not throw anymore