mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
Pad: Don't create no-op revisions
This commit is contained in:
parent
56b7671422
commit
a370cfa5c6
6 changed files with 18 additions and 12 deletions
|
@ -278,7 +278,7 @@ describe(__filename, function () {
|
|||
const res = await agent.post(endPoint('setText'))
|
||||
.send({
|
||||
padID: testPadId,
|
||||
text: 'testTextTwo',
|
||||
text: 'testTextThree',
|
||||
})
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/);
|
||||
|
|
|
@ -84,19 +84,19 @@ describe(__filename, function () {
|
|||
assert.equal(pad.text(), 'hello\n');
|
||||
});
|
||||
|
||||
it('identity changeset is accepted', async function () {
|
||||
it('identity changeset is accepted, has no effect', async function () {
|
||||
sendUserChanges('Z:1>5+5$hello');
|
||||
await assertAccepted(rev + 1);
|
||||
sendUserChanges('Z:6>0$');
|
||||
await assertAccepted(rev + 1);
|
||||
await assertAccepted(rev);
|
||||
assert.equal(pad.text(), 'hello\n');
|
||||
});
|
||||
|
||||
it('non-identity changeset with no net change is accepted', async function () {
|
||||
it('non-identity changeset with no net change is accepted, has no effect', async function () {
|
||||
sendUserChanges('Z:1>5+5$hello');
|
||||
await assertAccepted(rev + 1);
|
||||
sendUserChanges('Z:6>0-5+5$hello');
|
||||
await assertAccepted(rev + 1);
|
||||
await assertAccepted(rev);
|
||||
assert.equal(pad.text(), 'hello\n');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue