|
@@ -135,7 +135,7 @@ describe "FileHandler", ->
|
|
|
|
|
|
|
|
it "should getFileStream if it does exists", (done)->
|
|
it "should getFileStream if it does exists", (done)->
|
|
|
@PersistorManager.checkIfFileExists.callsArgWith(2, null, true)
|
|
@PersistorManager.checkIfFileExists.callsArgWith(2, null, true)
|
|
|
- @PersistorManager.getFileStream.callsArgWith(2)
|
|
|
|
|
|
|
+ @PersistorManager.getFileStream.callsArgWith(3)
|
|
|
@handler._getConvertedFile @bucket, @key, {}, =>
|
|
@handler._getConvertedFile @bucket, @key, {}, =>
|
|
|
@PersistorManager.getFileStream.calledWith(@bucket).should.equal true
|
|
@PersistorManager.getFileStream.calledWith(@bucket).should.equal true
|
|
|
done()
|
|
done()
|
|
@@ -152,7 +152,7 @@ describe "FileHandler", ->
|
|
|
it "should _convertFile ", (done)->
|
|
it "should _convertFile ", (done)->
|
|
|
@stubbedStream = {"something":"here"}
|
|
@stubbedStream = {"something":"here"}
|
|
|
@PersistorManager.sendFile = sinon.stub().callsArgWith(3)
|
|
@PersistorManager.sendFile = sinon.stub().callsArgWith(3)
|
|
|
- @PersistorManager.getFileStream = sinon.stub().callsArgWith(2, null, @stubbedStream)
|
|
|
|
|
|
|
+ @PersistorManager.getFileStream = sinon.stub().callsArgWith(3, null, @stubbedStream)
|
|
|
@convetedKey = @key+"converted"
|
|
@convetedKey = @key+"converted"
|
|
|
@handler._convertFile = sinon.stub().callsArgWith(3, null, @stubbedPath)
|
|
@handler._convertFile = sinon.stub().callsArgWith(3, null, @stubbedPath)
|
|
|
@ImageOptimiser.compressPng = sinon.stub().callsArgWith(1)
|
|
@ImageOptimiser.compressPng = sinon.stub().callsArgWith(1)
|
|
@@ -169,7 +169,7 @@ describe "FileHandler", ->
|
|
|
@FileConverter.convert.callsArgWith(2, null, @formattedStubbedPath)
|
|
@FileConverter.convert.callsArgWith(2, null, @formattedStubbedPath)
|
|
|
@FileConverter.thumbnail.callsArgWith(1, null, @formattedStubbedPath)
|
|
@FileConverter.thumbnail.callsArgWith(1, null, @formattedStubbedPath)
|
|
|
@FileConverter.preview.callsArgWith(1, null, @formattedStubbedPath)
|
|
@FileConverter.preview.callsArgWith(1, null, @formattedStubbedPath)
|
|
|
- @handler._writeS3FileToDisk = sinon.stub().callsArgWith(2, null, @stubbedPath)
|
|
|
|
|
|
|
+ @handler._writeS3FileToDisk = sinon.stub().callsArgWith(3, null, @stubbedPath)
|
|
|
@LocalFileWriter.deleteFile.callsArgWith(1)
|
|
@LocalFileWriter.deleteFile.callsArgWith(1)
|
|
|
|
|
|
|
|
it "should call thumbnail on the writer path if style was thumbnail was specified", (done)->
|
|
it "should call thumbnail on the writer path if style was thumbnail was specified", (done)->
|