wip league admin tools
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||
import { InMemoryRaceRepository } from './InMemoryRaceRepository';
|
||||
import { Race, RaceStatus } from '@core/racing/domain/entities/Race';
|
||||
import { Race, type RaceStatusValue } from '@core/racing/domain/entities/Race';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
describe('InMemoryRaceRepository', () => {
|
||||
@@ -23,7 +23,7 @@ describe('InMemoryRaceRepository', () => {
|
||||
track: string,
|
||||
car: string,
|
||||
scheduledAt: Date,
|
||||
status: RaceStatus = 'scheduled'
|
||||
status: RaceStatusValue = 'scheduled',
|
||||
) => {
|
||||
return Race.create({
|
||||
id,
|
||||
@@ -178,7 +178,7 @@ describe('InMemoryRaceRepository', () => {
|
||||
const race = createTestRace('1', 'league1', 'Track1', 'Car1', new Date());
|
||||
await repository.create(race);
|
||||
|
||||
const updatedRace = race.complete();
|
||||
const updatedRace = race.start().complete();
|
||||
const result = await repository.update(updatedRace);
|
||||
expect(result).toEqual(updatedRace);
|
||||
expect(mockLogger.info).toHaveBeenCalledWith('Race 1 updated successfully.');
|
||||
|
||||
Reference in New Issue
Block a user