mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Merge pull request #3257 from overleaf/jpa-mongoose-latest
[misc] upgrade mongoose to the latest version GitOrigin-RevId: cc612312e1661a92907dd8d42a32aeccb8cdb62d
This commit is contained in:
committed by
Copybot
parent
e01f9109c6
commit
dba5127856
@@ -96,7 +96,7 @@ describe('ProjectEntityUpdateHandler', function() {
|
||||
)
|
||||
}
|
||||
this.ProjectModel = {
|
||||
update: sinon.stub()
|
||||
updateOne: sinon.stub()
|
||||
}
|
||||
this.ProjectGetter = {
|
||||
getProject: sinon.stub(),
|
||||
@@ -385,7 +385,7 @@ describe('ProjectEntityUpdateHandler', function() {
|
||||
this.rootDocId = 'root-doc-id-123123'
|
||||
})
|
||||
|
||||
it('should call Project.update when the doc exists and has a valid extension', function() {
|
||||
it('should call Project.updateOne when the doc exists and has a valid extension', function() {
|
||||
this.ProjectEntityHandler.getDocPathByProjectIdAndDocId.yields(
|
||||
null,
|
||||
`/main.tex`
|
||||
@@ -396,12 +396,12 @@ describe('ProjectEntityUpdateHandler', function() {
|
||||
this.rootDocId,
|
||||
() => {}
|
||||
)
|
||||
this.ProjectModel.update
|
||||
this.ProjectModel.updateOne
|
||||
.calledWith({ _id: projectId }, { rootDoc_id: this.rootDocId })
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
it("should not call Project.update when the doc doesn't exist", function() {
|
||||
it("should not call Project.updateOne when the doc doesn't exist", function() {
|
||||
this.ProjectEntityHandler.getDocPathByProjectIdAndDocId.yields(
|
||||
Errors.NotFoundError
|
||||
)
|
||||
@@ -411,7 +411,7 @@ describe('ProjectEntityUpdateHandler', function() {
|
||||
this.rootDocId,
|
||||
() => {}
|
||||
)
|
||||
this.ProjectModel.update
|
||||
this.ProjectModel.updateOne
|
||||
.calledWith({ _id: projectId }, { rootDoc_id: this.rootDocId })
|
||||
.should.equal(false)
|
||||
})
|
||||
@@ -434,9 +434,9 @@ describe('ProjectEntityUpdateHandler', function() {
|
||||
})
|
||||
|
||||
describe('unsetRootDoc', function() {
|
||||
it('should call Project.update', function() {
|
||||
it('should call Project.updateOne', function() {
|
||||
this.ProjectEntityUpdateHandler.unsetRootDoc(projectId)
|
||||
this.ProjectModel.update
|
||||
this.ProjectModel.updateOne
|
||||
.calledWith({ _id: projectId }, { $unset: { rootDoc_id: true } })
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user