summaryrefslogtreecommitdiff
path: root/tests/backend/specs/api
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-12-24 04:01:18 +0000
committerJohn McLear <john@mclear.co.uk>2014-12-24 04:01:18 +0000
commitc409495b5e3f0ea9e36a4a283c18950df4a2d9b8 (patch)
tree691a4801c0629d9035e498695863d10b6dad121c /tests/backend/specs/api
parent80fa2c2868ebb0ad16c7512214dffa0781abbb1b (diff)
downloadetherpad-lite-c409495b5e3f0ea9e36a4a283c18950df4a2d9b8.zip
test for pad users
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;