From 9496480a29287f53d4ffcaed1e8aa912a1e0ce77 Mon Sep 17 00:00:00 2001 From: Hayden Faulds Date: Mon, 29 Jan 2018 13:08:52 +0000 Subject: [PATCH] test project lock is taken --- .../ThirdPartyDataStore/UpdateMergerTests.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/web/test/unit/coffee/ThirdPartyDataStore/UpdateMergerTests.coffee b/services/web/test/unit/coffee/ThirdPartyDataStore/UpdateMergerTests.coffee index 7bb27413f6..de7c50ac58 100644 --- a/services/web/test/unit/coffee/ThirdPartyDataStore/UpdateMergerTests.coffee +++ b/services/web/test/unit/coffee/ThirdPartyDataStore/UpdateMergerTests.coffee @@ -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, =>