Assign postpone_by to system when auto-cleaning

This commit is contained in:
Jorge Manrubia
2025-10-15 15:08:41 +02:00
parent 4cc8ab829e
commit 0666e504d6
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ module Card::Entropic
class_methods do
def auto_postpone_all_due
due_to_be_postponed.find_each do |card|
card.postpone
card.postpone(user: User.system)
end
end
end
+1
View File
@@ -33,6 +33,7 @@ class Card::EntropicTest < ActiveSupport::TestCase
end
assert cards(:logo).reload.postponed?
assert_equal User.system, cards(:logo).postponed_by
assert_not cards(:shipping).reload.postponed?
end