We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aed8ad4 commit ad3f2d3Copy full SHA for ad3f2d3
apps/api/src/modules/auth/__tests__/auth.service.spec.ts
@@ -176,4 +176,15 @@ describe('AuthService', () => {
176
expect(confirmResult).toBeInstanceOf(CannotFindEmailConfirm);
177
});
178
179
+
180
+ describe('sign-out', () => {
181
+ it('should delete refresh token from user on signOut', async () => {
182
+ rep.user.findOne.mockResolvedValue(user);
183
184
+ await authService.signOut(user.id);
185
186
+ expect(rep.user.save).toHaveBeenCalledTimes(1);
187
+ expect(rep.user.save).toHaveBeenCalledWith({ ...user, refreshTokenHash: null });
188
+ });
189
190
0 commit comments