Introduce a separate controller for collection entropy config

which opens the door to rendering turbo frames in the responses to
collection edits.
This commit is contained in:
Mike Dalessio
2025-07-02 17:41:29 -04:00
parent 2377770ef6
commit 36727ba5ea
4 changed files with 33 additions and 1 deletions
@@ -0,0 +1,17 @@
require "test_helper"
class Collections::EntropyConfigurationsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
@collection = collections(:writebook)
end
test "update" do
put collection_entropy_configuration_path(@collection), params: { collection: { auto_close_period: 1.day, auto_reconsider_period: 2.days } }
assert_equal 1.day, @collection.entropy_configuration.reload.auto_close_period
assert_equal 2.days, @collection.entropy_configuration.reload.auto_reconsider_period
assert_redirected_to edit_collection_path(@collection)
end
end