fix issues

This commit is contained in:
2026-01-02 00:21:24 +01:00
parent 79913bb45e
commit 8693dde21e
46 changed files with 1680 additions and 302 deletions

View File

@@ -69,7 +69,7 @@ describe('AuthService - New Methods', () => {
{ execute: vi.fn() } as any,
{ execute: vi.fn() } as any,
{ execute: vi.fn() } as any,
{ execute: vi.fn() } as any,
forgotPasswordUseCase as any,
{ execute: vi.fn() } as any,
{ execute: vi.fn() } as any,
new FakeAuthSessionPresenter() as any,
@@ -175,8 +175,9 @@ describe('AuthService - New Methods', () => {
const demoLoginPresenter = new FakeDemoLoginPresenter();
const mockUser = {
getId: () => ({ value: 'demo-user-123' }),
getDisplayName: () => 'Demo Driver',
getDisplayName: () => 'Alex Johnson',
getEmail: () => 'demo.driver@example.com',
getPrimaryDriverId: () => undefined,
};
const demoLoginUseCase = {
@@ -210,17 +211,20 @@ describe('AuthService - New Methods', () => {
const result = await service.demoLogin({ role: 'driver' });
expect(demoLoginUseCase.execute).toHaveBeenCalledWith({ role: 'driver' });
expect(identitySessionPort.createSession).toHaveBeenCalledWith({
id: 'demo-user-123',
displayName: 'Demo Driver',
email: 'demo.driver@example.com',
});
expect(identitySessionPort.createSession).toHaveBeenCalledWith(
{
id: 'demo-user-123',
displayName: 'Alex Johnson',
email: 'demo.driver@example.com',
},
undefined
);
expect(result).toEqual({
token: 'demo-token-123',
user: {
userId: 'demo-user-123',
email: 'demo.driver@example.com',
displayName: 'Demo Driver',
displayName: 'Alex Johnson',
},
});
});