test project lock is taken

This commit is contained in:
Hayden Faulds 2018-01-29 13:08:52 +00:00
parent 22737e8bd6
commit 9496480a29

View file

@ -56,6 +56,11 @@ describe 'UpdateMerger :', ->
@projectLocator.findElementByPath.calledWith(@project_id, @path).should.equal true
done()
it 'should take a project lock', (done)->
@updateMerger.mergeUpdate @user_id, @project_id, @path, @update, @source, =>
@LockManager.runWithLock.calledWith(@project_id).should.equal true
done()
it 'should process update as doc', (done)->
@updateMerger.mergeUpdate @user_id, @project_id, @filePath, @update, @source, =>
@FileTypeManager.isBinary.calledWith(@filePath, @fsPath).should.equal true
@ -93,6 +98,11 @@ describe 'UpdateMerger :', ->
@projectLocator.findElementByPath.calledWith(@project_id, @path).should.equal true
done()
it 'should take a project lock', (done)->
@updateMerger.deleteUpdate @user_id, @project_id, @path, @source, =>
@LockManager.runWithLock.calledWith(@project_id).should.equal true
done()
it 'should delete the entity in the editor controller with the correct type', (done)->
@entity.lines = []
@updateMerger.deleteUpdate @user_id, @project_id, @path, @source, =>