X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e83f0bd13121ab520c68d3a49a3f0f59a1266cd2..b9c5df4dad88cc9e49046f86856caf1d9ac041f3:/test/test_helper.rb diff --git a/test/test_helper.rb b/test/test_helper.rb index 5bf8a5239..5fe1ada47 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -384,14 +384,11 @@ module ActiveSupport Settings.merge!(saved_settings) end - def with_user_account_deletion_delay(value) + def with_user_account_deletion_delay(value, &block) freeze_time - default_value = Settings.user_account_deletion_delay - Settings.user_account_deletion_delay = value - yield - - Settings.user_account_deletion_delay = default_value + with_settings(:user_account_deletion_delay => value, &block) + ensure unfreeze_time end end