mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
fix broken acceptence tests, bad quotes in file path
This commit is contained in:
parent
6657b6c1dc
commit
8efd562eb3
2 changed files with 5 additions and 3 deletions
|
@ -76,6 +76,8 @@ module.exports =
|
||||||
LocalFileWriter.deleteFile originalFsPath, ->
|
LocalFileWriter.deleteFile originalFsPath, ->
|
||||||
callback(err, destPath, originalFsPath)
|
callback(err, destPath, originalFsPath)
|
||||||
|
|
||||||
|
logger.log opts:opts, "converting file depending on opts"
|
||||||
|
|
||||||
if opts.format?
|
if opts.format?
|
||||||
FileConverter.convert originalFsPath, opts.format, done
|
FileConverter.convert originalFsPath, opts.format, done
|
||||||
else if opts.style == "thumbnail"
|
else if opts.style == "thumbnail"
|
||||||
|
|
|
@ -136,18 +136,18 @@ describe "Filestore", ->
|
||||||
describe "getting the preview image", ->
|
describe "getting the preview image", ->
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@fileUrl = @fileUrl + '?style=preview'
|
@previewFileUrl = "#{@fileUrl}?style=preview"
|
||||||
|
|
||||||
it "should not time out", (done) ->
|
it "should not time out", (done) ->
|
||||||
@timeout(1000 * 20)
|
@timeout(1000 * 20)
|
||||||
request.get @fileUrl, (err, response, body) =>
|
request.get @previewFileUrl, (err, response, body) =>
|
||||||
expect(response).to.not.equal null
|
expect(response).to.not.equal null
|
||||||
done()
|
done()
|
||||||
|
|
||||||
it "should respond with image data", (done) ->
|
it "should respond with image data", (done) ->
|
||||||
# note: this test relies of the imagemagick conversion working
|
# note: this test relies of the imagemagick conversion working
|
||||||
@timeout(1000 * 20)
|
@timeout(1000 * 20)
|
||||||
request.get @fileUrl, (err, response, body) =>
|
request.get @previewFileUrl, (err, response, body) =>
|
||||||
expect(response.statusCode).to.equal 200
|
expect(response.statusCode).to.equal 200
|
||||||
expect(body.length).to.be.greaterThan 400
|
expect(body.length).to.be.greaterThan 400
|
||||||
done()
|
done()
|
||||||
|
|
Loading…
Reference in a new issue