|
|
@@ -45,14 +45,21 @@ describe('User Integration Tests', () => {
|
|
|
email: 'integration@example.com',
|
|
|
nickname: 'Integration User'
|
|
|
};
|
|
|
+ const originalUserData = {
|
|
|
+ ...userData
|
|
|
+ }
|
|
|
|
|
|
const createdUser = await userService.createUser(userData);
|
|
|
|
|
|
+ console.debug('Original userData:', originalUserData);
|
|
|
+ console.debug('Original password:', userData.password);
|
|
|
+ console.debug('Hashed password:', createdUser.password);
|
|
|
+
|
|
|
expect(createdUser.id).toBeDefined();
|
|
|
expect(createdUser.username).toBe(userData.username);
|
|
|
expect(createdUser.email).toBe(userData.email);
|
|
|
expect(createdUser.nickname).toBe(userData.nickname);
|
|
|
- expect(createdUser.password).not.toBe(userData.password); // Password should be hashed
|
|
|
+ expect(createdUser.password).not.toBe(originalUserData.password); // Password should be hashed
|
|
|
|
|
|
// Retrieve user
|
|
|
const retrievedUser = await userService.getUserById(createdUser.id);
|