summaryrefslogtreecommitdiff
path: root/tests/backend/specs/api
diff options
context:
space:
mode:
Diffstat (limited to 'tests/backend/specs/api')
-rw-r--r--tests/backend/specs/api/pad.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js
index 80f77220..e6b6de81 100644
--- a/tests/backend/specs/api/pad.js
+++ b/tests/backend/specs/api/pad.js
@@ -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;