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:
Jakob Ackermann
2020-11-03 03:05:09 +00:00
committed by Copybot
parent 6a837ce457
commit e249a2e5be
60 changed files with 671 additions and 454 deletions
@@ -21,7 +21,7 @@ const { assert } = require('chai')
describe('UserFeaturesUpdater', function() {
beforeEach(function() {
this.User = { updateOne: sinon.stub().callsArgWith(2) }
this.User = { update: sinon.stub().callsArgWith(2) }
return (this.UserFeaturesUpdater = SandboxedModule.require(modulePath, {
globals: {
console: console
@@ -49,7 +49,7 @@ describe('UserFeaturesUpdater', function() {
'features.versioning': true,
'features.collaborators': 10
}
this.User.updateOne
this.User.update
.calledWith({ _id: user_id }, update)
.should.equal(true)
features.should.deep.equal(this.features)