|
|
@@ -304,7 +304,7 @@ describe('多租户用户订单管理API集成测试', () => {
|
|
|
if (response.status === 403) {
|
|
|
const result = await response.json();
|
|
|
|
|
|
- expect(result.error).toBe('当前订单状态不允许取消');
|
|
|
+ expect(result.message).toBe('当前订单状态不允许取消');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -327,7 +327,7 @@ describe('多租户用户订单管理API集成测试', () => {
|
|
|
if (response.status === 404) {
|
|
|
const result = await response.json();
|
|
|
|
|
|
- expect(result.error).toBe('订单不存在');
|
|
|
+ expect(result.message).toBe('订单不存在');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -353,9 +353,11 @@ describe('多租户用户订单管理API集成测试', () => {
|
|
|
|
|
|
// 应该返回404,因为订单不在当前租户
|
|
|
expect(response.status).toBe(404);
|
|
|
- const result = await response.json();
|
|
|
+ if (response.status === 404) {
|
|
|
+ const result = await response.json();
|
|
|
|
|
|
- expect(result.error).toBe('订单不存在');
|
|
|
+ expect(result.message).toBe('订单不存在');
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
it('应该拒绝跨用户取消订单', async () => {
|