mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
remove old processUncompressedUpdates method
replace with new per doc method
This commit is contained in:
@@ -182,17 +182,7 @@ describe "UpdatesManager", ->
|
||||
@updates = ["mock-update"]
|
||||
@RedisManager.getOldestDocUpdates = sinon.stub().callsArgWith(2, null, @updates)
|
||||
@RedisManager.expandDocUpdates = sinon.stub().callsArgWith(1, null, @updates)
|
||||
@UpdatesManager.processUncompressedUpdates @project_id, @doc_id, @callback
|
||||
|
||||
it "should check if the updates are temporary", ->
|
||||
@UpdateTrimmer.shouldTrimUpdates
|
||||
.calledWith(@project_id)
|
||||
.should.equal true
|
||||
|
||||
it "should backport the project id", ->
|
||||
@MongoManager.backportProjectId
|
||||
.calledWith(@project_id, @doc_id)
|
||||
.should.equal true
|
||||
@UpdatesManager.processUncompressedUpdates @project_id, @doc_id, @temporary, @callback
|
||||
|
||||
it "should get the oldest updates", ->
|
||||
@RedisManager.getOldestDocUpdates
|
||||
@@ -225,7 +215,7 @@ describe "UpdatesManager", ->
|
||||
@RedisManager.expandDocUpdates = (jsonUpdates, callback) =>
|
||||
callback null, jsonUpdates
|
||||
sinon.spy @RedisManager, "expandDocUpdates"
|
||||
@UpdatesManager.processUncompressedUpdates @project_id, @doc_id, (args...) =>
|
||||
@UpdatesManager.processUncompressedUpdates @project_id, @doc_id, @temporary, (args...) =>
|
||||
@callback(args...)
|
||||
done()
|
||||
|
||||
@@ -257,6 +247,16 @@ describe "UpdatesManager", ->
|
||||
@LockManager.runWithLock = sinon.stub().callsArg(2)
|
||||
@UpdatesManager.processUncompressedUpdatesWithLock @project_id, @doc_id, @callback
|
||||
|
||||
it "should check if the updates are temporary", ->
|
||||
@UpdateTrimmer.shouldTrimUpdates
|
||||
.calledWith(@project_id)
|
||||
.should.equal true
|
||||
|
||||
it "should backport the project id", ->
|
||||
@MongoManager.backportProjectId
|
||||
.calledWith(@project_id, @doc_id)
|
||||
.should.equal true
|
||||
|
||||
it "should run processUncompressedUpdates with the lock", ->
|
||||
@LockManager.runWithLock
|
||||
.calledWith(
|
||||
|
||||
Reference in New Issue
Block a user