From 5627a8b0b898239b1974398ee2f5dec2c44d5ffa Mon Sep 17 00:00:00 2001 From: Aymeric Le Dorze Date: Wed, 1 Aug 2018 14:54:04 +0200 Subject: [PATCH] No need to stale paranoid_value when destroying fully --- lib/acts_as_paranoid/core.rb | 1 - test/test_core.rb | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/acts_as_paranoid/core.rb b/lib/acts_as_paranoid/core.rb index e9e217ef..acd663c4 100644 --- a/lib/acts_as_paranoid/core.rb +++ b/lib/acts_as_paranoid/core.rb @@ -129,7 +129,6 @@ def destroy_fully! true end - stale_paranoid_value @destroyed = true freeze end diff --git a/test/test_core.rb b/test/test_core.rb index eded55d3..8600f947 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -83,6 +83,13 @@ def test_non_persisted_destroy! assert_not_nil pt.paranoid_value end + def test_non_persisted_destroy_fully! + pt = ParanoidTime.new + assert_nil pt.paranoid_value + pt.destroy_fully! + assert_nil pt.paranoid_value + end + def test_removal_not_persisted assert ParanoidTime.new.destroy end