Allow optional image name to be passed
This commit is contained in:
@@ -44,6 +44,7 @@ describe "CompileManager", ->
|
||||
project_id: @project_id = "project-id-123"
|
||||
compiler: @compiler = "pdflatex"
|
||||
timeout: @timeout = 42000
|
||||
imageName: @image = "example.com/image"
|
||||
@Settings.compileDir = "compiles"
|
||||
@compileDir = "#{@Settings.path.compilesDir}/#{@project_id}"
|
||||
@ResourceWriter.syncResourcesToDisk = sinon.stub().callsArg(3)
|
||||
@@ -64,6 +65,7 @@ describe "CompileManager", ->
|
||||
mainFile: @rootResourcePath
|
||||
compiler: @compiler
|
||||
timeout: @timeout
|
||||
image: @image
|
||||
})
|
||||
.should.equal true
|
||||
|
||||
|
||||
@@ -19,12 +19,13 @@ describe "LatexRunner", ->
|
||||
@directory = "/local/compile/directory"
|
||||
@mainFile = "main-file.tex"
|
||||
@compiler = "pdflatex"
|
||||
@image = "example.com/image"
|
||||
@callback = sinon.stub()
|
||||
@project_id = "project-id-123"
|
||||
|
||||
describe "runLatex", ->
|
||||
beforeEach ->
|
||||
@CommandRunner.run = sinon.stub().callsArg(4)
|
||||
@CommandRunner.run = sinon.stub().callsArg(5)
|
||||
|
||||
describe "normally", ->
|
||||
beforeEach ->
|
||||
@@ -33,11 +34,12 @@ describe "LatexRunner", ->
|
||||
mainFile: @mainFile
|
||||
compiler: @compiler
|
||||
timeout: @timeout = 42000
|
||||
image: @image
|
||||
@callback
|
||||
|
||||
it "should run the latex command", ->
|
||||
@CommandRunner.run
|
||||
.calledWith(@project_id, sinon.match.any, @directory, @timeout)
|
||||
.calledWith(@project_id, sinon.match.any, @directory, @image, @timeout)
|
||||
.should.equal true
|
||||
|
||||
describe "with an .Rtex main file", ->
|
||||
@@ -46,6 +48,7 @@ describe "LatexRunner", ->
|
||||
directory: @directory
|
||||
mainFile: "main-file.Rtex"
|
||||
compiler: @compiler
|
||||
image: @image
|
||||
timeout: @timeout = 42000
|
||||
@callback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user