|
|
@@ -115,7 +115,7 @@ describe 'UpdateMerger :', ->
|
|
|
@fileName = "file.png"
|
|
|
@fsPath = "fs/path.tex"
|
|
|
@editorController.addFile = sinon.stub().callsArg(6)
|
|
|
- @editorController.replaceFile = sinon.stub().callsArg(4)
|
|
|
+ @editorController.replaceFile = sinon.stub().callsArg(5)
|
|
|
@editorController.deleteEntity = sinon.stub()
|
|
|
@editorController.mkdirp = sinon.stub().withArgs(@project_id).callsArgWith(2, null, [@folder], @folder)
|
|
|
@updateMerger.p.writeStreamToDisk = sinon.stub().withArgs(@project_id, @file_id, @update).callsArgWith(3, null, @fsPath)
|
|
|
@@ -123,7 +123,7 @@ describe 'UpdateMerger :', ->
|
|
|
it 'should replace file if the file already exists', (done)->
|
|
|
@updateMerger.p.processFile @project_id, @file_id, @fsPath, @path, @source, @user_id, =>
|
|
|
@editorController.addFile.called.should.equal false
|
|
|
- @editorController.replaceFile.calledWith(@project_id, @file_id, @fsPath, @source).should.equal true
|
|
|
+ @editorController.replaceFile.calledWith(@project_id, @file_id, @fsPath, @source, @user_id).should.equal true
|
|
|
done()
|
|
|
|
|
|
it 'should call add file if the file does not exist', (done)->
|