mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 06:39:01 +02:00
Merge pull request #10739 from overleaf/em-history-mongo-backend
Send a history id from web when creating a project GitOrigin-RevId: dd1417ae734c76990931885df1864a81a9439da0
This commit is contained in:
@@ -39,6 +39,7 @@ describe('ProjectHistoryHandler', function () {
|
||||
return Project
|
||||
})()
|
||||
this.project = new this.ProjectModel()
|
||||
this.historyId = this.project._id.toString()
|
||||
|
||||
this.callback = sinon.stub()
|
||||
|
||||
@@ -57,10 +58,9 @@ describe('ProjectHistoryHandler', function () {
|
||||
|
||||
describe('starting history for an existing project', function () {
|
||||
beforeEach(function () {
|
||||
this.newHistoryId = 123456789
|
||||
this.HistoryManager.initializeProject = sinon
|
||||
.stub()
|
||||
.callsArgWith(0, null, this.newHistoryId)
|
||||
.yields(null, this.historyId)
|
||||
this.HistoryManager.flushProject = sinon.stub().callsArg(1)
|
||||
return (this.ProjectEntityUpdateHandler.resyncProjectHistory = sinon
|
||||
.stub()
|
||||
@@ -96,7 +96,7 @@ describe('ProjectHistoryHandler', function () {
|
||||
return this.ProjectModel.updateOne
|
||||
.calledWith(
|
||||
{ _id: project_id, 'overleaf.history.id': { $exists: false } },
|
||||
{ 'overleaf.history.id': this.newHistoryId }
|
||||
{ 'overleaf.history.id': this.historyId }
|
||||
)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user