966aa51a37
touch_all on 10K cards took 6ms in testing
18 lines
547 B
Ruby
18 lines
547 B
Ruby
require "test_helper"
|
|
|
|
class Entropy::Test < ActiveSupport::TestCase
|
|
test "touch cards when entropy changes for collection" do
|
|
assert_changes -> { collections(:writebook).cards.first.updated_at } do
|
|
collections(:writebook).entropy.update!(auto_postpone_period: 15.days)
|
|
end
|
|
end
|
|
|
|
test "touch cards when entropy changes for account container" do
|
|
account = Account.sole
|
|
|
|
assert_changes -> { account.cards.first.updated_at } do
|
|
collections(:writebook).entropy.update!(auto_postpone_period: 15.days)
|
|
end
|
|
end
|
|
end
|