mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(core): Prevent object deletion request on no prefix match (#7366)
This commit is contained in:
@@ -248,6 +248,14 @@ describe('deleteMany()', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should not send a deletion request if no prefix match', async () => {
|
||||
objectStoreService.list = jest.fn().mockResolvedValue([]);
|
||||
|
||||
const result = await objectStoreService.deleteMany('non-matching-prefix');
|
||||
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should throw an error on request failure', async () => {
|
||||
mockAxios.request.mockRejectedValue(mockError);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user