|
|
@@ -29,7 +29,7 @@ describe "FileConverter", ->
|
|
|
describe "convert", ->
|
|
|
|
|
|
it "should convert the source to the requested format", (done)->
|
|
|
- @child_process.exec.callsArgWith(1)
|
|
|
+ @child_process.exec.callsArgWith(2)
|
|
|
@converter.convert @sourcePath, @format, (err)=>
|
|
|
args = @child_process.exec.args[0][0]
|
|
|
args.indexOf(@sourcePath).should.not.equal -1
|
|
|
@@ -37,26 +37,26 @@ describe "FileConverter", ->
|
|
|
done()
|
|
|
|
|
|
it "should return the dest path", (done)->
|
|
|
- @child_process.exec.callsArgWith(1)
|
|
|
+ @child_process.exec.callsArgWith(2)
|
|
|
@converter.convert @sourcePath, @format, (err, destPath)=>
|
|
|
destPath.should.equal "#{@sourcePath}.#{@format}"
|
|
|
done()
|
|
|
|
|
|
it "should return the error from convert", (done)->
|
|
|
- @child_process.exec.callsArgWith(1, @error)
|
|
|
+ @child_process.exec.callsArgWith(2, @error)
|
|
|
@converter.convert @sourcePath, @format, (err)=>
|
|
|
err.should.equal @error
|
|
|
done()
|
|
|
|
|
|
it "should not accapt an non aproved format", (done)->
|
|
|
- @child_process.exec.callsArgWith(1)
|
|
|
+ @child_process.exec.callsArgWith(2)
|
|
|
@converter.convert @sourcePath, "ahhhhh", (err)=>
|
|
|
expect(err).to.exist
|
|
|
done()
|
|
|
|
|
|
describe "thumbnail", ->
|
|
|
it "should call easy image resize with args", (done)->
|
|
|
- @child_process.exec.callsArgWith(1)
|
|
|
+ @child_process.exec.callsArgWith(2)
|
|
|
@converter.thumbnail @sourcePath, (err)=>
|
|
|
args = @child_process.exec.args[0][0]
|
|
|
args.indexOf(@sourcePath).should.not.equal -1
|
|
|
@@ -64,7 +64,7 @@ describe "FileConverter", ->
|
|
|
|
|
|
describe "preview", ->
|
|
|
it "should call easy image resize with args", (done)->
|
|
|
- @child_process.exec.callsArgWith(1)
|
|
|
+ @child_process.exec.callsArgWith(2)
|
|
|
@converter.preview @sourcePath, (err)=>
|
|
|
args = @child_process.exec.args[0][0]
|
|
|
args.indexOf(@sourcePath).should.not.equal -1
|