优化
This commit is contained in:
@@ -10,6 +10,7 @@ describe('overseas business routes', () => {
|
||||
['overseas-business/purchases/:purchaseId/edit', permission.purchaseEdit],
|
||||
['overseas-business/trucks', permission.truckList],
|
||||
['overseas-business/trucks/new', permission.truckCreate],
|
||||
['overseas-business/trucks/:orderId', permission.truckList],
|
||||
['overseas-business/trucks/:orderId/edit', permission.truckEdit],
|
||||
['overseas-business/looseboards', permission.looseboardList],
|
||||
['overseas-business/looseboards/new', permission.looseboardCreate],
|
||||
@@ -17,10 +18,10 @@ describe('overseas business routes', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('does not invent excluded create or detail routes', () => {
|
||||
it('adds the requested truck detail without opening unrelated routes', () => {
|
||||
const paths = overseasBusinessRoutes.map((route) => route.path)
|
||||
expect(paths).not.toContain('overseas-business/purchases/new')
|
||||
expect(paths).not.toContain('overseas-business/trucks/:orderId')
|
||||
expect(paths).toContain('overseas-business/trucks/:orderId')
|
||||
expect(paths).not.toContain('overseas-business/looseboards/:orderId')
|
||||
expect(JSON.stringify(overseasBusinessRoutes)).not.toContain('permissionAnyOf')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user