Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tianrunhe committed Dec 16, 2024
1 parent e039f51 commit 6955d22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/server/__tests__/deleteUsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('Delete users by email', async () => {
}
}
... on DeleteUsersSuccess {
success
deletedEmails
}
}
}
Expand All @@ -29,7 +29,7 @@ test('Delete users by email', async () => {
expect(deleteUsers).toMatchObject({
data: {
deleteUsers: {
success: true
deletedEmails: emails
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion packages/server/graphql/public/mutations/deleteUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const deleteUsers: MutationResolvers['deleteUsers'] = async (
for (const userToDelete of usersToDelete) {
const deletedUserEmail = await softDeleteUser(userToDelete.id, dataLoader)
await markUserSoftDeleted(userToDelete.id, deletedUserEmail, 'Mass user deletion')
deletedEmails.push(deletedUserEmail)
deletedEmails.push(userToDelete.email)
}

return {deletedEmails}
Expand Down

0 comments on commit 6955d22

Please sign in to comment.