mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-28 22:41:02 +00:00
test project lock is taken
This commit is contained in:
parent
22737e8bd6
commit
9496480a29
1 changed files with 10 additions and 0 deletions
|
@ -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, =>
|
||||
|
|
Loading…
Reference in a new issue