mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Merge pull request #3348 from overleaf/revert-3298-jpa-re-land-mongoose-latest
Revert "[misc] re-land: remove mongojs and bump mongoose" GitOrigin-RevId: 45a284435c88898d96769ab258651fb8d6d20ff5
This commit is contained in:
@@ -83,9 +83,7 @@ describe('ProjectHistoryHandler', function() {
|
||||
.stub()
|
||||
.withArgs(project_id)
|
||||
.callsArgWith(1, null, this.project)
|
||||
this.ProjectModel.updateOne = sinon
|
||||
.stub()
|
||||
.callsArgWith(2, null, { n: 1 })
|
||||
this.ProjectModel.update = sinon.stub().callsArgWith(2, null, { n: 1 })
|
||||
return this.ProjectHistoryHandler.ensureHistoryExistsForProject(
|
||||
project_id,
|
||||
this.callback
|
||||
@@ -103,7 +101,7 @@ describe('ProjectHistoryHandler', function() {
|
||||
})
|
||||
|
||||
it('should set the new history id on the project', function() {
|
||||
return this.ProjectModel.updateOne
|
||||
return this.ProjectModel.update
|
||||
.calledWith(
|
||||
{ _id: project_id, 'overleaf.history.id': { $exists: false } },
|
||||
{ 'overleaf.history.id': this.newHistoryId }
|
||||
@@ -135,7 +133,7 @@ describe('ProjectHistoryHandler', function() {
|
||||
.stub()
|
||||
.withArgs(project_id)
|
||||
.callsArgWith(1, null, this.project)
|
||||
this.ProjectModel.updateOne = sinon.stub()
|
||||
this.ProjectModel.update = sinon.stub()
|
||||
return this.ProjectHistoryHandler.ensureHistoryExistsForProject(
|
||||
project_id,
|
||||
this.callback
|
||||
@@ -153,7 +151,7 @@ describe('ProjectHistoryHandler', function() {
|
||||
})
|
||||
|
||||
it('should not set the new history id on the project', function() {
|
||||
return this.ProjectModel.updateOne.called.should.equal(false)
|
||||
return this.ProjectModel.update.called.should.equal(false)
|
||||
})
|
||||
|
||||
it('should not resync the project history', function() {
|
||||
|
||||
Reference in New Issue
Block a user