summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis-test.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnosis-test.el b/gnosis-test.el
index 1504e02..7b598a0 100644
--- a/gnosis-test.el
+++ b/gnosis-test.el
@@ -127,9 +127,11 @@ If ask nil, leave testing env"
(progn
(unless (file-exists-p testing-dir)
(make-directory testing-dir))
- (when (file-exists-p testing-db)
- (delete-file testing-db))
(setf gnosis-db (emacsql-sqlite-open testing-db))
+ (dolist (table '(decks notes review review-log extras activity-log))
+ (condition-case nil
+ (gnosis--drop-table table)
+ (error (message "No %s table to drop." table))))
(setf gnosis-testing t)
(gnosis-db-init)
(gnosis-test-add-fields note-num)