fix: connect operations pages to real backend

This commit is contained in:
hectorzhao
2026-07-02 15:16:34 +08:00
parent ab421cf8a7
commit 321cf716f2
22 changed files with 1255 additions and 429 deletions
+10
View File
@@ -35,6 +35,9 @@ function createPrismaMock() {
findMany: jest.fn(),
create: jest.fn(),
},
operationLog: {
create: jest.fn(),
},
};
}
@@ -131,6 +134,13 @@ describe('BillingService', () => {
relatedType: 'recharge_order',
}),
});
expect(prisma.operationLog.create).toHaveBeenCalledWith({
data: expect.objectContaining({
action: 'billing.manual_recharge',
resource: 'recharge_order',
resourceId: 'order-1',
}),
});
});
it('writes freeze, charge, release, refund, and adjustment transactions', async () => {