mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
fix broken acceptence tests, bad quotes in file path
This commit is contained in:
@@ -76,6 +76,8 @@ module.exports =
|
||||
LocalFileWriter.deleteFile originalFsPath, ->
|
||||
callback(err, destPath, originalFsPath)
|
||||
|
||||
logger.log opts:opts, "converting file depending on opts"
|
||||
|
||||
if opts.format?
|
||||
FileConverter.convert originalFsPath, opts.format, done
|
||||
else if opts.style == "thumbnail"
|
||||
|
||||
@@ -136,18 +136,18 @@ describe "Filestore", ->
|
||||
describe "getting the preview image", ->
|
||||
|
||||
beforeEach ->
|
||||
@fileUrl = @fileUrl + '?style=preview'
|
||||
@previewFileUrl = "#{@fileUrl}?style=preview"
|
||||
|
||||
it "should not time out", (done) ->
|
||||
@timeout(1000 * 20)
|
||||
request.get @fileUrl, (err, response, body) =>
|
||||
request.get @previewFileUrl, (err, response, body) =>
|
||||
expect(response).to.not.equal null
|
||||
done()
|
||||
|
||||
it "should respond with image data", (done) ->
|
||||
# note: this test relies of the imagemagick conversion working
|
||||
@timeout(1000 * 20)
|
||||
request.get @fileUrl, (err, response, body) =>
|
||||
request.get @previewFileUrl, (err, response, body) =>
|
||||
expect(response.statusCode).to.equal 200
|
||||
expect(body.length).to.be.greaterThan 400
|
||||
done()
|
||||
|
||||
Reference in New Issue
Block a user