Skip to content

Node.js based forum software built for the modern web

remove unnecessary groups.resetCache calls

Barış Soner Uşaklı805da98a36c5
diff --git a/test/blacklist.js b/test/blacklist.js
index 9ec1e557d3..d6ccb23260 100644
--- a/test/blacklist.js
+++ b/test/blacklist.js
@@ -15,7 +15,6 @@ describe('blacklist', function () {
var adminUid;
before(function (done) {
- groups.resetCache();
user.create({ username: 'admin' }, function (err, uid) {
assert.ifError(err);
adminUid = uid;
diff --git a/test/categories.js b/test/categories.js
index 53ece967ff..04723eb28f 100644
--- a/test/categories.js
+++ b/test/categories.js
@@ -19,7 +19,6 @@ describe('Categories', function () {
var adminUid;
before(function (done) {
- groups.resetCache();
async.series({
posterUid: function (next) {
User.create({ username: 'poster' }, next);
diff --git a/test/controllers.js b/test/controllers.js
index a61594c47d..aed9de430d 100644
--- a/test/controllers.js
+++ b/test/controllers.js
@@ -28,7 +28,6 @@ describe('Controllers', function () {
var category;
before(function (done) {
- groups.resetCache();
async.series({
category: function (next) {
categories.create({
diff --git a/test/feeds.js b/test/feeds.js
index ffce775857..cbc059e580 100644
--- a/test/feeds.js
+++ b/test/feeds.js
@@ -20,7 +20,6 @@ describe('feeds', function () {
var fooUid;
var cid;
before(function (done) {
- groups.resetCache();
meta.config['feeds:disableRSS'] = 1;
async.series({
category: function (next) {
diff --git a/test/flags.js b/test/flags.js
index 31672844bf..6aeb162703 100644
--- a/test/flags.js
+++ b/test/flags.js
@@ -16,7 +16,6 @@ var Meta = require('../src/meta');
describe('Flags', function () {
before(function (done) {
- Groups.resetCache();
// Create some stuff to flag
async.waterfall([
async.apply(User.create, { username: 'testUser', password: 'abcdef', email: '[email protected]' }),
diff --git a/test/groups.js b/test/groups.js
index fa81e33462..eb0ed77378 100644
--- a/test/groups.js
+++ b/test/groups.js
@@ -14,7 +14,6 @@ describe('Groups', function () {
var adminUid;
var testUid;
before(function (done) {
- Groups.resetCache();
async.series([
function (next) {
// Create a group to play around with
diff --git a/test/messaging.js b/test/messaging.js
index 26ae4d867c..b80a3c5fe7 100644
--- a/test/messaging.js
+++ b/test/messaging.js
@@ -20,7 +20,6 @@ describe('Messaging Library', function () {
var roomId;
before(function (done) {
- Groups.resetCache();
// Create 3 users: 1 admin, 2 regular
async.series([
async.apply(User.create, { username: 'foo', password: 'barbar' }), // admin
diff --git a/test/notifications.js b/test/notifications.js
index a937510012..ab495aae2f 100644
--- a/test/notifications.js
+++ b/test/notifications.js
@@ -18,7 +18,6 @@ describe('Notifications', function () {
var notification;
before(function (done) {
- groups.resetCache();
user.create({ username: 'poster' }, function (err, _uid) {
if (err) {
return done(err);
diff --git a/test/posts.js b/test/posts.js
index f715f22274..fa029c26cb 100644
--- a/test/posts.js
+++ b/test/posts.js
@@ -30,7 +30,6 @@ describe('Post\'s', function () {
var cid;
before(function (done) {
- groups.resetCache();
async.series({
voterUid: function (next) {
user.create({ username: 'upvoter' }, next);
diff --git a/test/rewards.js b/test/rewards.js
index d707eb5f4c..99b85e0681 100644
--- a/test/rewards.js
+++ b/test/rewards.js
@@ -14,12 +14,11 @@ describe('rewards', function () {
var herpUid;
before(function (done) {
- Groups.resetCache();
// Create 3 users: 1 admin, 2 regular
async.series([
- async.apply(User.create, { username: 'foo', password: 'barbar' }),
- async.apply(User.create, { username: 'baz', password: 'quuxquux' }),
- async.apply(User.create, { username: 'herp', password: 'derpderp' }),
+ async.apply(User.create, { username: 'foo' }),
+ async.apply(User.create, { username: 'baz' }),
+ async.apply(User.create, { username: 'herp' }),
], function (err, uids) {
if (err) {
return done(err);
diff --git a/test/socket.io.js b/test/socket.io.js
index cb50b51a13..40f4d813b4 100644
--- a/test/socket.io.js
+++ b/test/socket.io.js
@@ -42,7 +42,7 @@ describe('socket.io', function () {
adminUid = data[0];
regularUid = data[1];
cid = data[2].cid;
- groups.resetCache();
+
groups.join('administrators', data[0], done);
});
});
diff --git a/test/topics.js b/test/topics.js
index 7e903b0d9f..a2c5f29ae0 100644
--- a/test/topics.js
+++ b/test/topics.js
@@ -23,7 +23,6 @@ describe('Topic\'s', function () {
var adminUid;
before(function (done) {
- groups.resetCache();
User.create({ username: 'admin', password: '123456' }, function (err, uid) {
if (err) {
return done(err);
diff --git a/test/user.js b/test/user.js
index 18fd77ece4..6a0b961279 100644
--- a/test/user.js
+++ b/test/user.js
@@ -23,8 +23,6 @@ describe('User', function () {
var testCid;
before(function (done) {
- groups.resetCache();
-
Categories.create({
name: 'Test Category',
description: 'A test',