feat(M08-D): 补后台订单运营
This commit is contained in:
@@ -89,6 +89,14 @@ assert.equal(listInput.pageSize, 5);
|
||||
assert.equal(listInput.status, 'PENDING_PAYMENT');
|
||||
assert.equal(listInput.storeId, '18');
|
||||
|
||||
const adminListed = await app.inject({
|
||||
method: 'GET',
|
||||
url: '/admin-api/orders?page=1&pageSize=20&storeId=18',
|
||||
headers: { authorization: `Bearer ${token}` }
|
||||
});
|
||||
assert.equal(adminListed.statusCode, 200);
|
||||
assert.equal(listInput.storeId, '18');
|
||||
|
||||
const detail = await app.inject({
|
||||
method: 'GET',
|
||||
url: '/app-api/orders/31',
|
||||
@@ -97,6 +105,13 @@ const detail = await app.inject({
|
||||
assert.equal(detail.statusCode, 200);
|
||||
assert.equal(detailInput.orderId, '31');
|
||||
|
||||
const adminDetail = await app.inject({
|
||||
method: 'GET', url: '/admin-api/orders/31',
|
||||
headers: { authorization: `Bearer ${token}` }
|
||||
});
|
||||
assert.equal(adminDetail.statusCode, 200);
|
||||
assert.equal(detailInput.orderId, '31');
|
||||
|
||||
const unauthenticated = await app.inject({
|
||||
method: 'GET',
|
||||
url: '/app-api/orders'
|
||||
|
||||
Reference in New Issue
Block a user