feat: download completed export jobs
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 01:31:09 -04:00
parent ad8f675f5e
commit ec322df25c
5 changed files with 34 additions and 0 deletions
@@ -125,4 +125,9 @@ test('enqueues and polls an asynchronous inventory export', async (testContext)
assert.equal(enqueue.json().data.id, 'job-1');
assert.equal(poll.statusCode, 200);
assert.deepEqual(poll.json().data.output, [{ id: 'item-1' }]);
const download = await app.inject({ method: 'GET', url: '/api/v1/admin/exports/jobs/job-1/download' });
assert.equal(download.statusCode, 200);
assert.equal(download.headers['content-disposition'], 'attachment; filename="inventory.json"');
assert.deepEqual(JSON.parse(download.body), [{ id: 'item-1' }]);
});