Skip to content

Commit d1c2128

Browse files
author
Andrey
committed
Added two more tests for optimization and thumbnail
1 parent fdde299 commit d1c2128

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

files/optimized_webviewer.pdf

-5 Bytes
Binary file not shown.

test/test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,26 @@ describe('/GET files', () => {
3030
});
3131
});
3232

33+
describe('/GET optimize/filename', () => {
34+
it('it should GET optimized PDF file', (done) => {
35+
chai.request(server)
36+
.get('/optimize/webviewer.pdf')
37+
.end((err, res) => {
38+
chai.expect(res.status).to.equal(200);
39+
chai.expect(res.type).to.equal(mimeType['.pdf']);
40+
done();
41+
});
42+
});
43+
});
44+
45+
describe('/GET thumbnail/filename', () => {
46+
it('it should GET a thumbnail of a PDF file', (done) => {
47+
chai.request(server)
48+
.get('/thumbnail/webviewer.pdf')
49+
.end((err, res) => {
50+
chai.expect(res.status).to.equal(200);
51+
chai.expect(res.type).to.equal(mimeType['.png']);
52+
done();
53+
});
54+
});
55+
});

0 commit comments

Comments
 (0)