From c409495b5e3f0ea9e36a4a283c18950df4a2d9b8 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 24 Dec 2014 04:01:18 +0000 Subject: [PATCH] test for pad users --- tests/backend/specs/api/pad.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js index 80f77220f..e6b6de81c 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;