add test: confirming a confirmed contribution throws

This commit is contained in:
Moriz Wahl 2023-01-11 21:40:11 +01:00
parent 29479bafec
commit 8f9e77a9c1

View File

@ -1947,6 +1947,23 @@ describe('ContributionResolver', () => {
}),
)
})
describe('confirm same contribution again', () => {
it('throws an error', async () => {
await expect(
mutate({
mutation: confirmContribution,
variables: {
id: creation ? creation.id : -1,
},
}),
).resolves.toEqual(
expect.objectContaining({
errors: [new GraphQLError('Contribution already confirmd.')],
}),
)
})
})
})
describe('confirm two creations one after the other quickly', () => {