summaryrefslogtreecommitdiff
path: root/users/test/unit
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-18 14:05:28 +0100
committerAzul <azul@leap.se>2012-12-18 14:05:28 +0100
commit5a35873f8a12915d44cfa77239d094960ce6971e (patch)
treea1d88dfc255d4520b476ec0e12d5609cef8e2964 /users/test/unit
parent76904d3f677520eb191a90f2abb15b9df5fd8ae9 (diff)
only destroy user that has been persisted in teardown
Diffstat (limited to 'users/test/unit')
-rw-r--r--users/test/unit/email_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/test/unit/email_test.rb b/users/test/unit/email_test.rb
index 5aa2b11..6f9beaa 100644
--- a/users/test/unit/email_test.rb
+++ b/users/test/unit/email_test.rb
@@ -14,7 +14,7 @@ class EmailTest < ActiveSupport::TestCase
teardown do
@user.destroy if @user.persisted? # just in case
- @other_user.destroy
+ @other_user.destroy if @other_user.persisted?
end