fix core tests

This commit is contained in:
2025-12-23 20:09:02 +01:00
parent 7290fe69b5
commit b5431355ca
25 changed files with 415 additions and 211 deletions

View File

@@ -13,11 +13,11 @@ describe('UpdateLeagueMemberRoleUseCase', () => {
it('updates league member role successfully', async () => {
const mockMembership = {
id: 'league-1:driver-1',
leagueId: 'league-1',
driverId: 'driver-1',
role: 'member',
status: 'active',
joinedAt: new Date(),
leagueId: { toString: () => 'league-1' },
driverId: { toString: () => 'driver-1' },
role: { toString: () => 'member' },
status: { toString: () => 'active' },
joinedAt: { toDate: () => new Date() },
};
const mockLeagueMembershipRepository = {
@@ -112,7 +112,7 @@ describe('UpdateLeagueMemberRoleUseCase', () => {
>;
expect(error.code).toBe('REPOSITORY_ERROR');
expect(error.details.message).toBe('Failed to update league member role');
expect(error.details.message).toBe('Database connection failed');
expect(output.present).not.toHaveBeenCalled();
});
});