Merge pull request #3277 from overleaf/revert-3257-jpa-mongoose-latest

Revert "[misc] upgrade mongoose to the latest version"

GitOrigin-RevId: d5957fca68be65a08a687476742ffbb9c3cb86e8
This commit is contained in:
Simon Detheridge
2020-10-13 02:04:31 +00:00
committed by Copybot
parent dba5127856
commit c257b9695a
59 changed files with 655 additions and 445 deletions
@@ -43,13 +43,13 @@ describe('UserMembershipHandler', function() {
_id: 'mock-institution-id',
v1Id: 123,
managerIds: [ObjectId(), ObjectId(), ObjectId()],
updateOne: sinon.stub().yields(null)
update: sinon.stub().yields(null)
}
this.publisher = {
_id: 'mock-publisher-id',
slug: 'slug',
managerIds: [ObjectId(), ObjectId()],
updateOne: sinon.stub().yields(null)
update: sinon.stub().yields(null)
}
this.UserMembershipViewModel = {
@@ -228,7 +228,7 @@ describe('UserMembershipHandler', function() {
EntityConfigs.institution,
this.email,
(error, user) => {
assertCalledWith(this.institution.updateOne, {
assertCalledWith(this.institution.update, {
$addToSet: { managerIds: this.newUser._id }
})
return done()
@@ -258,8 +258,8 @@ describe('UserMembershipHandler', function() {
EntityConfigs.institution,
this.newUser._id,
(error, user) => {
const { lastCall } = this.institution.updateOne
assertCalledWith(this.institution.updateOne, {
const { lastCall } = this.institution.update
assertCalledWith(this.institution.update, {
$pull: { managerIds: this.newUser._id }
})
return done()