view models
This commit is contained in:
@@ -60,21 +60,4 @@ describe('DashboardService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDashboardOverview', () => {
|
||||
it('should call getDashboardData and return the result', async () => {
|
||||
const dto = {
|
||||
totalUsers: 200,
|
||||
activeUsers: 100,
|
||||
totalRaces: 40,
|
||||
totalLeagues: 10,
|
||||
};
|
||||
mockApiClient.getDashboardData.mockResolvedValue(dto);
|
||||
|
||||
const result = await service.getDashboardOverview();
|
||||
|
||||
expect(mockApiClient.getDashboardData).toHaveBeenCalled();
|
||||
expect(result).toBeInstanceOf(AnalyticsDashboardViewModel);
|
||||
expect(result.totalUsers).toBe(200);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user