test publisher id

This commit is contained in:
Moriz Wahl 2021-12-29 14:02:17 +01:00
parent 0cd6a40304
commit 56afb18e81

View File

@ -204,6 +204,25 @@ describe('UserResolver', () => {
)
})
})
describe('no publisher id', () => {
it('sets publisher id to null', async () => {
await mutate({
mutation,
variables: { ...variables, email: 'raeuber@hotzenplotz.de', publisherId: undefined },
})
await expect(
getRepository(LoginUser).createQueryBuilder('login_user').getMany(),
).resolves.toEqual(
expect.arrayContaining([
expect.objectContaining({
email: 'raeuber@hotzenplotz.de',
publisherId: null,
}),
]),
)
})
})
})
})