feat: add retry functionality for failed downloads

This commit is contained in:
jahruz67
2026-07-24 10:21:06 -07:00
parent fceac97033
commit 1839e5484d
9 changed files with 178 additions and 33 deletions
@@ -117,6 +117,14 @@ describe('DownloadsService', () => {
req.flush({ presets: ['Preset A'] });
});
it('retry() posts the failed download id', () => {
service.retry('https://example.com/v').subscribe();
const req = httpMock.expectOne('retry');
expect(req.request.method).toBe('POST');
expect(req.request.body).toEqual({ ids: ['https://example.com/v'] });
req.flush({ status: 'ok' });
});
it('cancelAdd posts to cancel-add', () => {
service.cancelAdd().subscribe();
const req = httpMock.expectOne('cancel-add');