Files
fizzy/test/models/entropy_test.rb
T
David Heinemeier Hansson 966aa51a37 Get rid of unnecessary touch jobs
touch_all on 10K cards took 6ms in testing
2025-11-02 14:15:53 +01:00

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