优化
This commit is contained in:
@@ -50,6 +50,21 @@ describe('platform first-leg order API', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('normalizes string pagination fields returned by the gateway', async () => {
|
||||
vi.mocked(http.get).mockResolvedValue({
|
||||
code: '200',
|
||||
message: 'success',
|
||||
data: { records: [], page: '1', size: '20', total: '6', pages: '1' },
|
||||
})
|
||||
|
||||
await expect(listPlatformFirstLegOrders({ status: 'SUBMITTED', page: 1, size: 20 })).resolves.toMatchObject({
|
||||
page: 1,
|
||||
size: 20,
|
||||
total: 6,
|
||||
pages: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('uses the platform lifecycle routes and target tenant query parameter', async () => {
|
||||
vi.mocked(http.get).mockResolvedValue({ code: '200', message: 'success', data: { order: {} } })
|
||||
vi.mocked(http.post).mockResolvedValue({ code: '200', message: 'success', data: null })
|
||||
|
||||
Reference in New Issue
Block a user