feat: add portfolio

This commit is contained in:
2026-08-13 22:44:53 +03:00
parent c0a4a93880
commit dfca11c81f
11 changed files with 771 additions and 78 deletions
@@ -18,10 +18,12 @@ describe('TbankConnectionService', () => {
getOrThrow: jest.fn(() => 'MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY='),
};
const tbank = { validateToken: jest.fn() };
const portfolio = { invalidate: jest.fn() };
const service = new TbankConnectionService(
prisma as never,
config as never,
tbank,
portfolio as never,
);
beforeEach(() => jest.clearAllMocks());
@@ -41,5 +43,6 @@ describe('TbankConnectionService', () => {
expect(prisma.tbankConnection.deleteMany).toHaveBeenCalledWith({
where: { userId: 'user-1' },
});
expect(portfolio.invalidate).toHaveBeenCalledWith('user-1');
});
});