stop referring to user entity before migration

This commit is contained in:
Hongbo Wu 2022-07-22 18:32:13 +08:00 committed by Jackson Harper
parent bd77a7f8ee
commit 024d4bd25c

View file

@ -186,14 +186,15 @@ describe('auth router', () => {
})
context('when user is not confirmed', async () => {
const pendingUser = await createTestUser(
'pending_user',
undefined,
correctPassword,
true
)
let pendingUser: User
before(async () => {
pendingUser = await createTestUser(
'pending_user',
undefined,
correctPassword,
true
)
email = pendingUser.email
password = correctPassword
})
@ -231,9 +232,10 @@ describe('auth router', () => {
})
context('when user has no password stored in db', async () => {
const socialAccountUser = await createTestUser('social_account_user')
let socialAccountUser: User
before(() => {
before(async () => {
socialAccountUser = await createTestUser('social_account_user')
email = socialAccountUser.email
password = 'Some password'
})