Add migration to restrict users without workspaces (#5369)
- update set null ON DELETE constraint to RESTRICT - update missing updates
This commit is contained in:
@ -160,6 +160,9 @@ describe('TokenService', () => {
|
||||
};
|
||||
const mockUser = { id: '1', email: 'user@example.com' };
|
||||
|
||||
const mockedNewDate = new Date();
|
||||
|
||||
jest.spyOn(global, 'Date').mockImplementation(() => mockedNewDate);
|
||||
jest
|
||||
.spyOn(appTokenRepository, 'findOne')
|
||||
.mockResolvedValue(mockToken as AppToken);
|
||||
@ -173,7 +176,7 @@ describe('TokenService', () => {
|
||||
where: {
|
||||
value: hashedToken,
|
||||
type: AppTokenType.PasswordResetToken,
|
||||
expiresAt: MoreThan(new Date()),
|
||||
expiresAt: MoreThan(mockedNewDate),
|
||||
revokedAt: IsNull(),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user