From 91a4fd6b5ab7a077211a7608248b3878f226d405 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 24 Oct 2023 20:57:25 +0300 Subject: [PATCH] Add user account deletion delay test helper --- test/test_helper.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index 68749c0f7..19e1a2784 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -371,5 +371,16 @@ module ActiveSupport el << tag_el end end + + def with_user_account_deletion_delay(value) + freeze_time + default_value = Settings.user_account_deletion_delay + Settings.user_account_deletion_delay = value + + yield + + Settings.user_account_deletion_delay = default_value + unfreeze_time + end end end -- 2.39.5