fix broken acceptence tests, bad quotes in file path

This commit is contained in:
Henry Oswald 2018-05-21 13:40:03 +01:00
parent 6657b6c1dc
commit 8efd562eb3
2 changed files with 5 additions and 3 deletions

View file

@ -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"

View file

@ -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()