mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
Added test for checking if a new pad can be created and deleted.
This commit is contained in:
parent
efe7a96914
commit
d6fbf04624
1 changed files with 18 additions and 0 deletions
|
@ -49,6 +49,24 @@ describe(__filename, function () {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
describe('createPad with empty text', () => {
|
||||
it('creates a new Pad with empty text', function (done) {
|
||||
agent.get(`${endPoint('createPad')}&padID=${padID}&text=`)
|
||||
.expect((res) => {
|
||||
if (res.body.code !== 0) throw new Error('Unable to create new Pad');
|
||||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200);
|
||||
agent.get(`${endPoint('deletePad')}&padID=${padID}`)
|
||||
.expect((res) => {
|
||||
if (res.body.code !== 0) throw new Error('Unable to delete empty Pad');
|
||||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done);
|
||||
});
|
||||
});
|
||||
|
||||
describe('createAuthor', function () {
|
||||
it('Creates an author with a name set', function (done) {
|
||||
agent.get(endPoint('createAuthor'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue