Assign postpone_by to system when auto-cleaning
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user