Commit 3ee20b59 by Michal Dobaczewski Committed by Ryan Bigg

Add test for destroy of a deleted? object

parent 83e31449
......@@ -188,6 +188,15 @@ class ParanoiaTest < Test::Unit::TestCase
assert_equal false, model.destroyed?
end
def test_destroy_twice
model = ParanoidModel.new
model.save
model.destroy
model.destroy
assert_equal 0, ParanoidModel.unscoped.where(id: model.id).count
end
def test_real_destroy
model = ParanoidModel.new
model.save
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment