mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
tests: Missing chat messages should cause check failure
This commit is contained in:
parent
cad2440e6a
commit
7c6746612c
1 changed files with 12 additions and 0 deletions
|
@ -335,6 +335,7 @@ describe(__filename, function () {
|
||||||
},
|
},
|
||||||
nextNum: 1,
|
nextNum: 1,
|
||||||
},
|
},
|
||||||
|
chatHead: 0,
|
||||||
head: 0,
|
head: 0,
|
||||||
savedRevisions: [],
|
savedRevisions: [],
|
||||||
},
|
},
|
||||||
|
@ -359,6 +360,11 @@ describe(__filename, function () {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'pad:testing:chat:0': {
|
||||||
|
text: 'this is a test',
|
||||||
|
authorId: 'a.foo',
|
||||||
|
time: 1637966993265,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const importEtherpad = (records) => agent.post(`/p/${testPadId}/import`)
|
const importEtherpad = (records) => agent.post(`/p/${testPadId}/import`)
|
||||||
|
@ -433,6 +439,12 @@ describe(__filename, function () {
|
||||||
records['pad:testing'].atext.attribs = `*0${records['pad:testing'].atext.attribs}`;
|
records['pad:testing'].atext.attribs = `*0${records['pad:testing'].atext.attribs}`;
|
||||||
await importEtherpad(records).expect(500);
|
await importEtherpad(records).expect(500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('missing chat message', async function () {
|
||||||
|
const records = makeGoodExport();
|
||||||
|
delete records['pad:testing:chat:0'];
|
||||||
|
await importEtherpad(records).expect(500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Import authorization checks', function () {
|
describe('Import authorization checks', function () {
|
||||||
|
|
Loading…
Reference in a new issue