fix broken unit tests

This commit is contained in:
Brian Gough 2017-08-07 15:00:16 +01:00
parent 3a930a636e
commit 567a89350b
2 changed files with 5 additions and 3 deletions

View file

@ -51,7 +51,7 @@ describe "CompileManager", ->
@env = {}
@Settings.compileDir = "compiles"
@compileDir = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}"
@ResourceWriter.syncResourcesToDisk = sinon.stub().callsArg(3)
@ResourceWriter.syncResourcesToDisk = sinon.stub().callsArg(2)
@LatexRunner.runLatex = sinon.stub().callsArg(2)
@OutputFileFinder.findOutputFiles = sinon.stub().callsArgWith(2, null, @output_files)
@OutputCacheManager.saveOutputFiles = sinon.stub().callsArgWith(2, null, @build_files)
@ -64,7 +64,7 @@ describe "CompileManager", ->
it "should write the resources to disk", ->
@ResourceWriter.syncResourcesToDisk
.calledWith(@project_id, @resources, @compileDir)
.calledWith(@request, @compileDir)
.should.equal true
it "should run LaTeX", ->

View file

@ -29,7 +29,9 @@ describe "ResourceWriter", ->
]
@ResourceWriter._writeResourceToDisk = sinon.stub().callsArg(3)
@ResourceWriter._removeExtraneousFiles = sinon.stub().callsArg(2)
@ResourceWriter.syncResourcesToDisk(@project_id, @resources, @basePath, @callback)
@ResourceWriter.checkSyncState = sinon.stub().callsArg(2)
@ResourceWriter.storeSyncState = sinon.stub().callsArg(2)
@ResourceWriter.syncResourcesToDisk({project_id: @project_id, resources: @resources}, @basePath, @callback)
it "should remove old files", ->
@ResourceWriter._removeExtraneousFiles