some basic moderator tests

v1.18.x
psychobunny 10 years ago
parent 48337e4f51
commit 6a9145d90e

@ -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 || {};

Loading…
Cancel
Save