Merge pull request #18906 from overleaf/em-migrate-existing-histories-2

History ranges migration script - second attempt

GitOrigin-RevId: 60a2c04e2a72e76a58e9e179fefc4186a96fde32
This commit is contained in:
Eric Mc Sween
2024-06-18 10:00:00 -04:00
committed by Copybot
parent 9d31d7e761
commit 44962fb5d7
28 changed files with 379 additions and 187 deletions
@@ -191,7 +191,7 @@ describe('ProjectOptionsHandler', function () {
describe('setting the rangesSupportEnabled', function () {
it('should perform and update on mongo', async function () {
await this.handler.promises.enableHistoryRangesSupport(projectId)
await this.handler.promises.setHistoryRangesSupport(projectId, true)
sinon.assert.calledWith(
this.db.projects.updateOne,
{ _id: new ObjectId(projectId) },
@@ -205,8 +205,8 @@ describe('ProjectOptionsHandler', function () {
})
it('should be rejected', async function () {
expect(this.handler.promises.enableHistoryRangesSupport(projectId)).to
.be.rejected
expect(this.handler.promises.setHistoryRangesSupport(projectId, true))
.to.be.rejected
})
})
})