mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
tests: chat API: Delete unnecessary describe()
calls
This commit is contained in:
parent
cb02253e62
commit
92d70e5ead
1 changed files with 6 additions and 27 deletions
|
@ -26,20 +26,8 @@ describe(__filename, function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// BEGIN GROUP AND AUTHOR TESTS
|
describe('message sequence', function () {
|
||||||
// ///////////////////////////////////
|
it('createPad', async function () {
|
||||||
// ///////////////////////////////////
|
|
||||||
|
|
||||||
/* Tests performed
|
|
||||||
-> createPad(padID)
|
|
||||||
-> createAuthor([name]) -- should return an authorID
|
|
||||||
-> appendChatMessage(padID, text, authorID, time)
|
|
||||||
-> getChatHead(padID)
|
|
||||||
-> getChatHistory(padID)
|
|
||||||
*/
|
|
||||||
|
|
||||||
describe('createPad', function () {
|
|
||||||
it('creates a new Pad', async function () {
|
|
||||||
await agent.get(`${endPoint('createPad')}&padID=${padID}`)
|
await agent.get(`${endPoint('createPad')}&padID=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -47,10 +35,8 @@ describe(__filename, function () {
|
||||||
assert.equal(res.body.code, 0);
|
assert.equal(res.body.code, 0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('createAuthor', function () {
|
it('createAuthor', async function () {
|
||||||
it('Creates an author with a name set', async function () {
|
|
||||||
await agent.get(endPoint('createAuthor'))
|
await agent.get(endPoint('createAuthor'))
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -60,10 +46,8 @@ describe(__filename, function () {
|
||||||
authorID = res.body.data.authorID; // we will be this author for the rest of the tests
|
authorID = res.body.data.authorID; // we will be this author for the rest of the tests
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('appendChatMessage', function () {
|
it('appendChatMessage', async function () {
|
||||||
it('Adds a chat message to the pad', async function () {
|
|
||||||
await agent.get(`${endPoint('appendChatMessage')}&padID=${padID}&text=blalblalbha` +
|
await agent.get(`${endPoint('appendChatMessage')}&padID=${padID}&text=blalblalbha` +
|
||||||
`&authorID=${authorID}&time=${timestamp}`)
|
`&authorID=${authorID}&time=${timestamp}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
@ -72,11 +56,8 @@ describe(__filename, function () {
|
||||||
assert.equal(res.body.code, 0);
|
assert.equal(res.body.code, 0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
it('getChatHead', async function () {
|
||||||
describe('getChatHead', function () {
|
|
||||||
it('Gets the head of chat', async function () {
|
|
||||||
await agent.get(`${endPoint('getChatHead')}&padID=${padID}`)
|
await agent.get(`${endPoint('getChatHead')}&padID=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
@ -85,10 +66,8 @@ describe(__filename, function () {
|
||||||
assert.equal(res.body.data.chatHead, 0);
|
assert.equal(res.body.data.chatHead, 0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('getChatHistory', function () {
|
it('getChatHistory', async function () {
|
||||||
it('Gets Chat History of a Pad', async function () {
|
|
||||||
await agent.get(`${endPoint('getChatHistory')}&padID=${padID}`)
|
await agent.get(`${endPoint('getChatHistory')}&padID=${padID}`)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue