mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test for the other two events
This commit is contained in:
parent
fa2916ef4d
commit
7583619058
@ -247,6 +247,18 @@ describe('Contribution Links', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('stores the ADMIN_CONTRIBUTION_LINK_CREATE event in the database', async () => {
|
||||
await expect(DbEvent.find()).resolves.toContainEqual(
|
||||
expect.objectContaining({
|
||||
type: EventType.ADMIN_CONTRIBUTION_LINK_CREATE,
|
||||
affectedUserId: 0,
|
||||
actingUserId: expect.any(Number),
|
||||
involvedContributionLinkId: expect.any(Number),
|
||||
amount: expect.decimalEqual(200),
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('returns an error if missing startDate', async () => {
|
||||
jest.clearAllMocks()
|
||||
await expect(
|
||||
@ -529,6 +541,18 @@ describe('Contribution Links', () => {
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('stores the ADMIN_CONTRIBUTION_LINK_UPDATE event in the database', async () => {
|
||||
await expect(DbEvent.find()).resolves.toContainEqual(
|
||||
expect.objectContaining({
|
||||
type: EventType.ADMIN_CONTRIBUTION_LINK_UPDATE,
|
||||
affectedUserId: 0,
|
||||
actingUserId: expect.any(Number),
|
||||
involvedContributionLinkId: expect.any(Number),
|
||||
amount: expect.decimalEqual(400),
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user