Skip to content

Commit 208877d

Browse files
author
Ben Stahl
committed
Test POST & HEAD rejections
1 parent 4b5ec2f commit 208877d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/Test-FileStore.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ describe('FileStore', () => {
150150
done();
151151
});
152152
});
153+
154+
it('should 404 paths without a file id', (done) => {
155+
request(server.listen())
156+
.head(`${STORE_PATH}/`)
157+
.set('Tus-Resumable', TUS_RESUMABLE)
158+
.expect(404, done);
159+
});
153160
});
154161

155162
describe('HEAD', () => {
@@ -204,5 +211,12 @@ describe('FileStore', () => {
204211
done();
205212
});
206213
});
214+
215+
it('should 404 files that dont exist', (done) => {
216+
request(server.listen())
217+
.head(`${STORE_PATH}/a_file_that_doesnt_exist`)
218+
.set('Tus-Resumable', TUS_RESUMABLE)
219+
.expect(404, done);
220+
});
207221
});
208222
});

0 commit comments

Comments
 (0)