优化
This commit is contained in:
@@ -95,13 +95,13 @@ describe('admin router access metadata', () => {
|
||||
const expected = [
|
||||
['notification-messages', '/notifications/messages', 'platform:notification:task:list'],
|
||||
['notification-templates', '/notifications/templates', 'platform:notification:template:list'],
|
||||
['my-notifications', '/notifications/mine', 'platform:notification:view'],
|
||||
]
|
||||
for (const [name, path, permission] of expected) {
|
||||
const route = router.getRoutes().find((item) => item.name === name)
|
||||
expect(route?.path).toBe(path)
|
||||
expect(route?.meta.permission).toBe(permission)
|
||||
}
|
||||
expect(router.getRoutes().find((item) => item.name === 'my-notifications')).toBeUndefined()
|
||||
})
|
||||
|
||||
it('redirects the removed enterprise review route to the protected customer list', () => {
|
||||
|
||||
Reference in New Issue
Block a user