From 9a8fa35d8d0eb8723549044f184778ac6c204815 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 4 Nov 2014 18:39:25 -0500 Subject: [PATCH] flushing db after every test group that touches the db --- tests/categories.js | 3 +-- tests/database.js | 4 ++++ tests/groups.js | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) 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(); + }); });