feat: add hourly portfolio sync history
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
import { configureApp } from '../src/main';
|
||||
import { CatalogEnrichmentService } from '../src/modules/investments/instruments/application/catalog-enrichment.service';
|
||||
import { ForecastRepository } from '../src/modules/investments/portfolio/infrastructure/forecast.repository';
|
||||
import { TbankHourlyScheduler } from '../src/modules/investments/tbank-sync/tbank-hourly.scheduler';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
|
||||
const shareUid = '00000000-0000-4000-8000-000000000001';
|
||||
@@ -137,6 +138,8 @@ describe('saved payout calendars and complete forecasts (SQLite HTTP)', () => {
|
||||
.useValue(upstream)
|
||||
.overrideProvider(MoexClient)
|
||||
.useValue(moex)
|
||||
.overrideProvider(TbankHourlyScheduler)
|
||||
.useValue({ tick: jest.fn() })
|
||||
.compile();
|
||||
app = module.createNestApplication();
|
||||
configureApp(app);
|
||||
@@ -220,6 +223,10 @@ describe('saved payout calendars and complete forecasts (SQLite HTTP)', () => {
|
||||
},
|
||||
});
|
||||
await portfolio([position()], userId);
|
||||
await prisma.tbankPortfolio.updateMany({
|
||||
where: { userId },
|
||||
data: { fetchedAt: new Date(Date.now() - 3_600_000) },
|
||||
});
|
||||
}
|
||||
});
|
||||
afterAll(async () => {
|
||||
|
||||
Reference in New Issue
Block a user