fix core tests
This commit is contained in:
@@ -61,11 +61,16 @@ describe('LoginWithEmailUseCase', () => {
|
||||
id: 'user-1',
|
||||
email: 'test@example.com',
|
||||
displayName: 'Test User',
|
||||
passwordHash: 'hashed-password',
|
||||
passwordHash: '',
|
||||
salt: 'salt',
|
||||
createdAt: new Date(),
|
||||
};
|
||||
|
||||
storedUser.passwordHash = await (useCase as unknown as { hashPassword: (p: string, s: string) => Promise<string> }).hashPassword(
|
||||
input.password,
|
||||
storedUser.salt,
|
||||
);
|
||||
|
||||
const session = {
|
||||
user: {
|
||||
id: storedUser.id,
|
||||
@@ -89,9 +94,8 @@ describe('LoginWithEmailUseCase', () => {
|
||||
expect(userRepository.findByEmail).toHaveBeenCalledWith('test@example.com');
|
||||
expect(sessionPort.createSession).toHaveBeenCalledWith({
|
||||
id: storedUser.id,
|
||||
email: storedUser.email,
|
||||
displayName: storedUser.displayName,
|
||||
primaryDriverId: undefined,
|
||||
email: storedUser.email,
|
||||
});
|
||||
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
|
||||
Reference in New Issue
Block a user