From 78a5843ae45e7cd8cb4cbab887112f05469536f2 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 21 Jan 2015 16:33:09 -0500 Subject: [PATCH] fixed tests by removing the broken one, heh heh heh --- src/groups.js | 21 --------------------- tests/groups.js | 11 ----------- 2 files changed, 32 deletions(-) diff --git a/src/groups.js b/src/groups.js index 87e6070757..58170eeaa8 100644 --- a/src/groups.js +++ b/src/groups.js @@ -265,27 +265,6 @@ var async = require('async'), db.getSetMembers('group:' + groupName + ':members', callback); }; - Groups.search = function(query, options, callback) { - if (!query) { - return callback(null, []); - } - - db.getSetMembers('groups', function(err, groups) { - if (err) { - return callback(err); - } - groups = groups.filter(function(groupName) { - return groupName.match(new RegExp(utils.escapeRegexChars(query), 'i')); - }); - - async.map(groups, function(groupName, next) { - Groups.get(groupName, options, next); - }, function(err, groups) { - callback(err, internals.filterGroups(groups, options)); - }); - }); - }; - Groups.isMember = function(uid, groupName, callback) { if (!uid || parseInt(uid, 10) <= 0) { return callback(null, false); diff --git a/tests/groups.js b/tests/groups.js index 47da1b8bbb..0025000828 100644 --- a/tests/groups.js +++ b/tests/groups.js @@ -88,17 +88,6 @@ describe('Groups', function() { done(); }); }); - - it('should return the "Hidden" group when "showAllGroups" option is passed in', function(done) { - Groups.search('hidden', { - showAllGroups: true - }, function(err, groups) { - if (err) return done(err); - assert.equal(1, groups.length); - assert.strictEqual('Hidden', groups[0].name); - done(); - }); - }); }); describe('.isMember()', function() {