mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 00:34:18 +00:00
fix broken unit tests
This commit is contained in:
parent
3a930a636e
commit
567a89350b
2 changed files with 5 additions and 3 deletions
|
@ -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", ->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue