more group tests

This commit is contained in:
barisusakli
2017-02-24 15:05:00 +03:00
parent b7d5bc7dc8
commit 3a87f2566a
4 changed files with 277 additions and 55 deletions

View File

@@ -1,6 +1,6 @@
'use strict';
var async = require('async');
var async = require('async');
var winston = require('winston');
var _ = require('underscore');
@@ -138,7 +138,6 @@ module.exports = function (Groups) {
};
Groups.acceptMembership = function (groupName, uid, callback) {
// Note: For simplicity, this method intentially doesn't check the caller uid for ownership!
async.waterfall([
async.apply(db.setRemove, 'group:' + groupName + ':pending', uid),
async.apply(db.setRemove, 'group:' + groupName + ':invited', uid),
@@ -147,7 +146,6 @@ module.exports = function (Groups) {
};
Groups.rejectMembership = function (groupName, uid, callback) {
// Note: For simplicity, this method intentially doesn't check the caller uid for ownership!
async.parallel([
async.apply(db.setRemove, 'group:' + groupName + ':pending', uid),
async.apply(db.setRemove, 'group:' + groupName + ':invited', uid)