Merge pull request #20834 from overleaf/em-validate-tracked-deletes

Sanity check for tracked changes in document-updater

GitOrigin-RevId: 5f4c5cb931a6dae5257fed2f21e40777cb466309
This commit is contained in:
Eric Mc Sween
2024-10-14 11:04:04 +00:00
committed by Copybot
parent 7258ddcf02
commit dc445121fe
4 changed files with 89 additions and 3 deletions
@@ -691,6 +691,8 @@ describe('DocumentManager', function () {
it('should apply the accept change to the ranges', function () {
this.RangesManager.acceptChanges.should.have.been.calledWith(
this.project_id,
this.doc_id,
[this.change_id],
this.ranges
)
@@ -722,7 +724,12 @@ describe('DocumentManager', function () {
it('should apply the accept change to the ranges', function () {
this.RangesManager.acceptChanges
.calledWith(this.change_ids, this.ranges)
.calledWith(
this.project_id,
this.doc_id,
this.change_ids,
this.ranges
)
.should.equal(true)
})
})
@@ -668,6 +668,8 @@ describe('RangesManager', function () {
beforeEach(function () {
this.change_ids = [this.ranges.changes[1].id]
this.result = this.RangesManager.acceptChanges(
this.project_id,
this.doc_id,
this.change_ids,
this.ranges
)
@@ -714,6 +716,8 @@ describe('RangesManager', function () {
this.ranges.changes[4].id,
]
this.result = this.RangesManager.acceptChanges(
this.project_id,
this.doc_id,
this.change_ids,
this.ranges
)