basic pad tests without test logic yet
parent
16f3ebb3ba
commit
1347a814f0
|
@ -40,39 +40,151 @@ describe('Permission', function(){
|
|||
});
|
||||
})
|
||||
|
||||
/* Pad Tests Order of execution
|
||||
-> deletePad -- This gives us a guaranteed clear environment
|
||||
-> createPad
|
||||
-> getRevisions(0) -- Should be 0
|
||||
-> getHTML -- Should be the default pad text in HTML format
|
||||
-> deletePad -- Should just delete a pad
|
||||
-> getHTML -- Should return an error
|
||||
-> createPad(withText)
|
||||
-> getText -- Should have the text specified above as the pad text
|
||||
-> setText
|
||||
-> getText -- Should be the text set before
|
||||
-> getRevisions -- Should be 0 still?
|
||||
-> padUsersCount -- Should be 0
|
||||
-> getReadOnlyId -- Should be a value
|
||||
*/
|
||||
|
||||
describe('deletePad', function(){
|
||||
it('deletes a Pad', function(done) {
|
||||
api.get(endPoint('deletePad')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('createPad', function(){
|
||||
it('creates a new pad', function(done) {
|
||||
it('creates a new Pad', function(done) {
|
||||
api.get(endPoint('createPad')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
/* Endpoints to interact with..
|
||||
createPad(padID [, text])
|
||||
getRevisions(padID)
|
||||
describe('getRevisions', function(){
|
||||
it('gets revision count of Pad', function(done) {
|
||||
api.get(endPoint('getRevisions')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getHTML', function(){
|
||||
it('get the HTML of Pad', function(done) {
|
||||
api.get(endPoint('getHTML')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('deletePad', function(){
|
||||
it('deletes a Pad', function(done) {
|
||||
api.get(endPoint('deletePad')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getHTML', function(){
|
||||
it('get the HTML of a Pad', function(done) {
|
||||
api.get(endPoint('getHTML')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('createPad', function(){
|
||||
it('creates a new Pad with text', function(done) {
|
||||
api.get(endPoint('createPad')+"&padID="+testPadId+"&test=testText")
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getText', function(){
|
||||
it('gets the Pad text', function(done) {
|
||||
api.get(endPoint('getText')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('setText', function(){
|
||||
it('creates a new Pad with text', function(done) {
|
||||
api.get(endPoint('createPad')+"&padID="+testPadId+"&test=testText")
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getText', function(){
|
||||
it('gets the Pad text', function(done) {
|
||||
api.get(endPoint('getText')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getRevisions', function(){
|
||||
it('gets Revision Coutn of a Pad', function(done) {
|
||||
api.get(endPoint('getRevisions')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('padUsersCount', function(){
|
||||
it('gets Revision Coutn of a Pad', function(done) {
|
||||
api.get(endPoint('padUsersCount')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
describe('getReadOnlyId', function(){
|
||||
it('Gets the Read Only ID of a Pad', function(done) {
|
||||
api.get(endPoint('getReadOnlyId')+"&padID="+testPadId)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200, done)
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
/* Endpoints Still to interact with..
|
||||
/ createPad(padID [, text])
|
||||
/ getRevisions(padID)
|
||||
/ deletePad(padID)
|
||||
/ getReadOnlyID(padID)
|
||||
/ getHTML(padID, [rev])
|
||||
/ setText(padID, text)
|
||||
/ getText(padID, [rev])
|
||||
|
||||
padUsersCount(padID)
|
||||
deletePad(padID)
|
||||
getReadOnlyID(padID)
|
||||
setPublicStatus(padID, publicStatus)
|
||||
getPublicStatus(padID)
|
||||
setPassword(padID, password)
|
||||
isPasswordProtected(padID)
|
||||
listAuthorsOfPad(padID)
|
||||
getLastEdited(padID)
|
||||
getHTML(padID, [rev])
|
||||
setText(padID, text)
|
||||
getText(padID, [rev])
|
||||
|
||||
listSessionsOfGroup(groupID)
|
||||
getSessionInfo(sessionID)
|
||||
deleteSession(sessionID)
|
||||
createSession(groupID, authorID, validUntil)
|
||||
|
||||
listPadsOfAuthor(authorID)
|
||||
createAuthorIfNotExistsFor(authorMapper [, name])
|
||||
createAuthor([name])
|
||||
|
||||
createGroupPad(groupID, padName [, text])
|
||||
listPads(groupID)
|
||||
deleteGroup(groupID)
|
||||
|
|
Loading…
Reference in New Issue