more tests

This commit is contained in:
Ulf Gebhardt 2026-01-17 17:43:41 +01:00
parent cb9caae9f6
commit 1111ccfe94
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -236,6 +236,16 @@ describe('pin groupPosts', () => {
})
})
it('no error thrown when pinned post was pinned again', async () => {
await mutate({ mutation: pinGroupPost, variables: { id: 'post-1-to-public-group' } })
await expect(
mutate({ mutation: pinGroupPost, variables: { id: 'post-1-to-public-group' } }),
).resolves.toMatchObject({
errors: undefined,
data: { pinGroupPost: { id: 'post-1-to-public-group', groupPinned: true } },
})
})
it('returns post-2-to-public-group as first, pinned post', async () => {
authenticatedUser = await publicUser.toJson()
await mutate({ mutation: pinGroupPost, variables: { id: 'post-2-to-public-group' } })