Skip to content

Node.js based forum software built for the modern web

flushing db after every test group that touches the db

Julian Lam9a8fa35d8d0e
diff --git a/tests/categories.js b/tests/categories.js
index 9c66735eee..1f0b29e734 100644
--- a/tests/categories.js
+++ b/tests/categories.js
@@ -55,7 +55,6 @@ describe('Categories', function() {
});
after(function() {
- db.delete('category:' + categoryObj.cid);
- db.sortedSetRemove('categories:cid', categoryObj.cid);
+ db.flushdb();
});
});
diff --git a/tests/database.js b/tests/database.js
index 6fab827b28..ecad48aedd 100644
--- a/tests/database.js
+++ b/tests/database.js
@@ -362,4 +362,8 @@ describe('Test database', function() {
});
});
+
+ after(function() {
+ db.flushdb();
+ });
});
diff --git a/tests/groups.js b/tests/groups.js
index 6dd888b9cd..d1f1e2e35e 100644
--- a/tests/groups.js
+++ b/tests/groups.js
@@ -285,4 +285,8 @@ describe('Groups', function() {
});
});
});
+
+ after(function() {
+ db.flushdb();
+ });
});