优化
This commit is contained in:
@@ -12,6 +12,11 @@ vi.mock('@/shared/api/http', async () => {
|
||||
|
||||
describe('inbound fee-detail API', () => {
|
||||
beforeEach(() => vi.clearAllMocks())
|
||||
it.each(['', ' ', 'null', 'undefined'])('rejects invalid inboundId %j without issuing HTTP', async (inboundId) => {
|
||||
await expect(listInboundFeeDetails('100', inboundId)).rejects.toThrow('inboundId is required')
|
||||
expect(http.get).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('maps the complete write contract and optimistic version', async () => {
|
||||
const payload: SaveInboundFeeDetailRequest = { feeItemId: '31', direction: 'PAYABLE', businessDate: '2026-08-12', unitPrice: 12.5, currency: 'CNY', amount: 125, settlementIncluded: true, partnerId: '41', partnerName: '测试供应商', remark: '验收' }
|
||||
vi.mocked(http.get).mockResolvedValue({ code: '200', message: 'success', data: [] })
|
||||
|
||||
Reference in New Issue
Block a user