interim+500

interim+500

interim+500
This commit is contained in:
mertalev
2025-10-02 15:15:32 -04:00
parent 9f3a9030c7
commit 97185964cb
2 changed files with 23 additions and 17 deletions
+3 -3
View File
@@ -223,7 +223,8 @@ describe('/upload', () => {
});
});
it('should reject attempt to start upload of existing incomplete asset', async () => {
// TODO: find a way to test interim responses
it('should return 500 if existing incomplete asset', async () => {
const content = randomBytes(1024);
const firstRequest = await request(app)
@@ -252,8 +253,7 @@ describe('/upload', () => {
.set('Upload-Length', '1024')
.send();
expect(secondRequest.status).toBe(400);
expect(secondRequest.headers['location']).toEqual(firstRequest.headers['location']);
expect(secondRequest.status).toBe(500);
expect(secondRequest.text).toEqual('Incomplete asset already exists');
});