fix(core): Reduce payload of license renewal calls (no-changelog) (#12236)

This commit is contained in:
Cornelius Suermann
2025-01-17 17:59:28 +01:00
committed by GitHub
parent 2c9b690010
commit de49182652
3 changed files with 29 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ describe('WorkflowRepository', () => {
});
describe('getActiveIds', () => {
it('should return active workflow IDs', async () => {
it('should return all active workflow IDs when invoked without maxResults', async () => {
//
// ARRANGE
//
@@ -92,6 +92,28 @@ describe('WorkflowRepository', () => {
// ASSERT
//
expect(activeIds).toEqual([workflows[0].id]);
expect(activeIds).toHaveLength(1);
});
it('should return a capped number of active workflow IDs when invoked with maxResults', async () => {
//
// ARRANGE
//
await Promise.all([
createWorkflow({ active: true }),
createWorkflow({ active: false }),
createWorkflow({ active: true }),
]);
//
// ACT
//
const activeIds = await Container.get(WorkflowRepository).getActiveIds({ maxResults: 1 });
//
// ASSERT
//
expect(activeIds).toHaveLength(1);
});
});
});