mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
ci: fix existing tests based off new permission handling
- Renamed test cases to reflect changes in permission checks being handled at the route level. - Updated assertions to verify that agents are returned regardless of user permissions due to the new permission system. - Adjusted mocks in AppService and PermissionService tests to ensure proper functionality without relying on actual implementations.
This commit is contained in:
parent
c07a342c97
commit
004f128aec
3 changed files with 15 additions and 8 deletions
|
|
@ -1,14 +1,12 @@
|
|||
jest.mock('~/models', () => ({
|
||||
initializeRoles: jest.fn(),
|
||||
seedDefaultRoles: jest.fn(),
|
||||
}));
|
||||
jest.mock('~/models/Role', () => ({
|
||||
updateAccessPermissions: jest.fn(),
|
||||
getRoleByName: jest.fn(),
|
||||
updateRoleByName: jest.fn(),
|
||||
}));
|
||||
jest.mock('~/models/AccessRole', () => ({
|
||||
seedDefaultRoles: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('~/config', () => ({
|
||||
logger: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue