tests: Missing chat messages should cause check failure

This commit is contained in:
Richard Hansen 2021-12-01 18:43:44 -05:00
parent cad2440e6a
commit 7c6746612c
1 changed files with 12 additions and 0 deletions

View File

@ -335,6 +335,7 @@ describe(__filename, function () {
},
nextNum: 1,
},
chatHead: 0,
head: 0,
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`)
@ -433,6 +439,12 @@ describe(__filename, function () {
records['pad:testing'].atext.attribs = `*0${records['pad:testing'].atext.attribs}`;
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 () {