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