mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-22 21:50:43 +03:00
4840 multi workspace update user userworkspace inconsistent on delete set null constraint (#5373)
This commit is contained in:
parent
8576127b47
commit
0018ec78b0
@ -14,6 +14,9 @@ module.exports = {
|
||||
transform: {
|
||||
'^.+\\.(t|j)s$': 'ts-jest',
|
||||
},
|
||||
fakeTimers: {
|
||||
enableGlobally: true,
|
||||
},
|
||||
collectCoverageFrom: ['**/*.(t|j)s'],
|
||||
coverageDirectory: '../coverage',
|
||||
};
|
||||
|
@ -160,9 +160,6 @@ 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);
|
||||
@ -176,7 +173,7 @@ describe('TokenService', () => {
|
||||
where: {
|
||||
value: hashedToken,
|
||||
type: AppTokenType.PasswordResetToken,
|
||||
expiresAt: MoreThan(mockedNewDate),
|
||||
expiresAt: MoreThan(new Date()),
|
||||
revokedAt: IsNull(),
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user