mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add tests that EVENT is stored in DB and has right values in userId.
This commit is contained in:
parent
16c44ff0c0
commit
a615c741c2
@ -815,6 +815,15 @@ describe('ContributionResolver', () => {
|
||||
})
|
||||
expect(isDenied).toBeTruthy()
|
||||
})
|
||||
|
||||
it('stores the admin deny contribution event in the database', async () => {
|
||||
await expect(EventProtocol.find()).resolves.toContainEqual(
|
||||
expect.objectContaining({
|
||||
type: EventProtocolType.ADMIN_CONTRIBUTION_DENY,
|
||||
userId: admin.id,
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -732,7 +732,7 @@ export class ContributionResolver {
|
||||
|
||||
const event = new Event()
|
||||
const eventAdminContributionDeny = new EventAdminContributionDeny()
|
||||
eventAdminContributionDeny.userId = contributionToUpdate.userId
|
||||
eventAdminContributionDeny.userId = moderator.id
|
||||
eventAdminContributionDeny.amount = contributionToUpdate.amount
|
||||
eventAdminContributionDeny.contributionId = contributionToUpdate.id
|
||||
await writeEvent(event.setEventAdminContributionDeny(eventAdminContributionDeny))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user