Prepare entropy code for the new auto postpone approach

This commit is contained in:
Jorge Manrubia
2025-09-24 15:11:50 +02:00
parent b63a6b3e97
commit 2f6a639682
42 changed files with 125 additions and 395 deletions
@@ -31,8 +31,7 @@ class CollectionsControllerTest < ActionDispatch::IntegrationTest
collection: {
name: "Writebook bugs",
all_access: false,
auto_close_period: 1.day,
auto_reconsider_period: 2.days
auto_postpone_period: 1.day
},
user_ids: users(:kevin, :jz).pluck(:id)
}
@@ -40,8 +39,7 @@ class CollectionsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to edit_collection_path(collections(:writebook))
assert_equal "Writebook bugs", collections(:writebook).reload.name
assert_equal users(:kevin, :jz).sort, collections(:writebook).users.sort
assert_equal 1.day, entropy_configurations(:writebook_collection).auto_close_period
assert_equal 2.days, entropy_configurations(:writebook_collection).auto_reconsider_period
assert_equal 1.day, entropy_configurations(:writebook_collection).auto_postpone_period
assert_not collections(:writebook).all_access?
end