test for pad users

This commit is contained in:
John McLear 2014-12-24 04:01:18 +00:00
parent 80fa2c2868
commit c409495b5e
1 changed files with 13 additions and 0 deletions

View File

@ -59,6 +59,7 @@ describe('Permission', function(){
-> getLastEdited(padID) -- Should be when pad was made
-> setText(padId)
-> getLastEdited(padID) -- Should be when setText was performed
-> padUsers(padID) -- Should be when setText was performed
*/
describe('deletePad', function(){
@ -252,6 +253,18 @@ describe('getLastEdited', function(){
});
})
describe('padUsers', function(){
it('gets User Count of a Pad', function(done) {
api.get(endPoint('padUsers')+"&padID="+testPadId)
.expect(function(res){
if(res.body.data.padUsers.length !== 0) throw new Error("Incorrect Pad Users")
})
.expect('Content-Type', /json/)
.expect(200, done)
});
})
var endPoint = function(point){
return '/api/'+apiVersion+'/'+point+'?apikey='+apiKey;