test(users): update unit tests for GDPR consent and export functionality

This commit is contained in:
Mathis HERRIOT 2025-05-17 00:12:23 +02:00
parent ea6684b7fa
commit 818a92f18c
No known key found for this signature in database
GPG Key ID: E7EB4A211D8D4907

View File

@ -219,7 +219,10 @@ describe('UsersService', () => {
const result = await service.updateGdprConsent(id); const result = await service.updateGdprConsent(id);
expect(service.update).toHaveBeenCalledWith(id, { gdprTimestamp: expect.any(Date) }); expect(service.update).toHaveBeenCalledWith(id, { gdprTimestamp: expect.any(Date) });
expect(result).toEqual(mockUser); expect(result).toEqual({
...mockUser,
gdprConsentDate: mockUser.gdprTimestamp
});
}); });
}); });
@ -244,6 +247,8 @@ describe('UsersService', () => {
expect(result).toEqual({ expect(result).toEqual({
user: mockUser, user: mockUser,
projects: [mockProject], projects: [mockProject],
groups: [],
persons: []
}); });
}); });
}); });