wip league admin tools
This commit is contained in:
@@ -87,19 +87,15 @@ describe('ReopenRaceUseCase', () => {
|
||||
|
||||
expect(result.isOk()).toBe(true);
|
||||
|
||||
expect(raceRepository.update).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
id: 'race-1',
|
||||
status: 'scheduled',
|
||||
}),
|
||||
);
|
||||
expect(raceRepository.update).toHaveBeenCalledTimes(1);
|
||||
const updatedRace = (raceRepository.update as Mock).mock.calls[0]?.[0] as Race;
|
||||
expect(updatedRace.id).toBe('race-1');
|
||||
expect(updatedRace.status.toString()).toBe('scheduled');
|
||||
|
||||
expect(output.present).toHaveBeenCalledWith({
|
||||
race: expect.objectContaining({
|
||||
id: 'race-1',
|
||||
status: 'scheduled',
|
||||
}),
|
||||
});
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
const presented = (output.present as Mock).mock.calls[0]?.[0] as ReopenRaceResult;
|
||||
expect(presented.race.id).toBe('race-1');
|
||||
expect(presented.race.status.toString()).toBe('scheduled');
|
||||
|
||||
expect(logger.info).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user