1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-13 00:26:55 -05:00

Properly remove temp files in view tests

This commit is contained in:
Jack Foltz 2018-08-01 20:28:21 -04:00
parent 1502c2b7a7
commit e0eacf5ff9
Signed by: foltik
GPG Key ID: 303F88F996E95541

View File

@ -385,7 +385,8 @@ describe('Viewing', () => {
util.createTestFile(2048, 'test.bin')
]);
const upload = await util.upload('test.bin', agent);
return verifyView('test.bin', upload.body.id, 'attachment; filename="test.bin"');
await verifyView('test.bin', upload.body.id, 'attachment; filename="test.bin"');
return util.deleteFile('test.bin');
});
it('must return an uploaded image file inline', async () => {
@ -394,7 +395,8 @@ describe('Viewing', () => {
util.createTestFile(2048, 'test.jpg')
]);
const upload = await util.upload('test.jpg', agent);
return verifyView('test.jpg', upload.body.id, 'inline');
await verifyView('test.jpg', upload.body.id, 'inline');
return util.deleteFile('test.jpg');
});
it('must return an error when file not found', async () => {