Merge pull request #3298 from overleaf/jpa-re-land-mongoose-latest

[misc] re-land: remove mongojs and bump mongoose

GitOrigin-RevId: 02f78d52ffc2d373c8c0bc4860d3b2326a46f5c9
This commit is contained in:
Jakob Ackermann
2020-11-03 03:04:52 +00:00
committed by Copybot
parent a73df8203e
commit 28fe397f38
60 changed files with 453 additions and 670 deletions
@@ -26,7 +26,7 @@ const EmailHelper = require('../../../../app/src/Features/Helpers/EmailHelper')
describe('UserRegistrationHandler', function() {
beforeEach(function() {
this.user = { _id: (this.user_id = '31j2lk21kjl') }
this.User = { update: sinon.stub().callsArgWith(2) }
this.User = { updateOne: sinon.stub().callsArgWith(2) }
this.UserGetter = { getUserByAnyEmail: sinon.stub() }
this.UserCreator = {
createNewUser: sinon.stub().callsArgWith(2, null, this.user)
@@ -129,7 +129,7 @@ describe('UserRegistrationHandler', function() {
it('should set holding account to false', function(done) {
return this.handler.registerNewUser(this.passingRequest, err => {
const update = this.User.update.args[0]
const update = this.User.updateOne.args[0]
assert.deepEqual(update[0], { _id: this.user._id })
assert.deepEqual(update[1], { $set: { holdingAccount: false } })
return done()