mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test for first event in ContributionLinkResolver
This commit is contained in:
parent
ff9df408e3
commit
fa2916ef4d
@ -15,6 +15,8 @@ import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { userFactory } from '@/seeds/factory/user'
|
||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
|
||||
let mutate: any, query: any, con: any
|
||||
let testEnv: any
|
||||
@ -566,6 +568,17 @@ describe('Contribution Links', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('stores the ADMIN_CONTRIBUTION_LINK_DELETE event in the database', async () => {
|
||||
await expect(DbEvent.find()).resolves.toContainEqual(
|
||||
expect.objectContaining({
|
||||
type: EventType.ADMIN_CONTRIBUTION_LINK_DELETE,
|
||||
affectedUserId: 0,
|
||||
actingUserId: expect.any(Number),
|
||||
involvedContributionLinkId: linkId,
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('does not list this contribution link anymore', async () => {
|
||||
await expect(query({ query: listContributionLinks })).resolves.toEqual(
|
||||
expect.objectContaining({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user