mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
Merge pull request #16186 from overleaf/mj-mongo-object-id
[web] Use constructor for ObjectId GitOrigin-RevId: 9eb8b377ea599605b72af237d1ab12f4d8287162
This commit is contained in:
committed by
Copybot
parent
0ac514f81b
commit
c371732e6e
@@ -11,10 +11,10 @@ const MODULE_PATH = path.join(
|
||||
|
||||
describe('ProjectController', function () {
|
||||
beforeEach(function () {
|
||||
this.project_id = ObjectId('abcdefabcdefabcdefabcdef')
|
||||
this.project_id = new ObjectId('abcdefabcdefabcdefabcdef')
|
||||
|
||||
this.user = {
|
||||
_id: ObjectId('123456123456123456123456'),
|
||||
_id: new ObjectId('123456123456123456123456'),
|
||||
email: 'test@overleaf.com',
|
||||
first_name: 'bjkdsjfk',
|
||||
features: {},
|
||||
@@ -590,7 +590,7 @@ describe('ProjectController', function () {
|
||||
this.res.render = (pageName, opts) => {
|
||||
expect(this.UserModel.updateOne).to.have.been.calledOnce
|
||||
expect(this.UserModel.updateOne.args[0][0]).to.deep.equal({
|
||||
_id: ObjectId(this.user._id),
|
||||
_id: new ObjectId(this.user._id),
|
||||
})
|
||||
expect(this.UserModel.updateOne.args[0][1].$set.lastActive).to.exist
|
||||
done()
|
||||
|
||||
Reference in New Issue
Block a user