From 6a9145d90e0e1dae5dee8901cd6d782c9aade85c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 2 Dec 2014 15:33:23 -0500 Subject: [PATCH] some basic moderator tests --- tests/user.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/user.js b/tests/user.js index 24a752afdd..ee7a352e3c 100644 --- a/tests/user.js +++ b/tests/user.js @@ -59,6 +59,31 @@ describe('User', function() { }); }); + describe('.isModerator()', function() { + it('should return', function(done) { + User.isModerator(testUid, testCid, function(err, isModerator) { + assert.equal(isModerator, false); + done(); + }); + }); + + it('should return', function(done) { + User.isModerator([testUid, testUid], testCid, function(err, isModerator) { + assert.equal(isModerator[0], false); + assert.equal(isModerator[1], false); + done(); + }); + }); + + it('should return', function(done) { + User.isModerator(testUid, [testCid, testCid], function(err, isModerator) { + assert.equal(isModerator[0], false); + assert.equal(isModerator[1], false); + done(); + }); + }); + }); + describe('.isReadyToPost()', function() { it('should error when a user makes two posts in quick succession', function(done) { Meta.config = Meta.config || {};