[MNT-24923] legal hold hold capabilities are not verified properly (#10930)

* [MNT-24923] Added possibility to filter capabilities by person id

* [MNT-24923] Documentation and unit tests
This commit is contained in:
AleksanderSklorz
2025-06-12 14:21:49 +02:00
committed by GitHub
parent 7a568baf72
commit cdc7553915
5 changed files with 67 additions and 12 deletions

View File

@@ -35,6 +35,8 @@ describe('FilePlansApi', () => {
});
describe('getFilePlanRoles', () => {
const filePlanId = 'filePlanId123';
let expectedRolePaging: FilePlanRolePaging;
beforeEach(() => {
@@ -101,7 +103,6 @@ describe('FilePlansApi', () => {
});
it('should get file plan roles', (done) => {
const filePlanId = 'filePlanId123';
filePlansApiMock.get200FilePlanRoles(filePlanId);
filePlansApi.getFilePlanRoles(filePlanId).then((rolePaging) => {
@@ -111,7 +112,6 @@ describe('FilePlansApi', () => {
});
it('should get file plan roles with filtering by capability names', (done) => {
const filePlanId = 'filePlanId123';
filePlansApiMock.get200FilePlanRolesWithFilteringByCapabilityNames(filePlanId);
filePlansApi
@@ -125,5 +125,36 @@ describe('FilePlansApi', () => {
done();
});
});
it('should get file plan roles with filtering by person id', (done) => {
filePlansApiMock.get200FilePlanRolesWithFilteringByPersonId(filePlanId);
filePlansApi
.getFilePlanRoles(filePlanId, {
where: {
personId: 'someUser'
}
})
.then((rolePaging) => {
expect(rolePaging).toEqual(expectedRolePaging);
done();
});
});
it('should get file plan roles with filtering by capability names', (done) => {
filePlansApiMock.get200FilePlanRolesWithFilteringByPersonIdAndCapabilityNames(filePlanId);
filePlansApi
.getFilePlanRoles(filePlanId, {
where: {
personId: 'someUser',
capabilityNames: ['capability1', 'capability2']
}
})
.then((rolePaging) => {
expect(rolePaging).toEqual(expectedRolePaging);
done();
});
});
});
});