Rename Entropy::Configuration to just Entropy

This commit is contained in:
David Heinemeier Hansson
2025-11-02 13:11:41 +01:00
parent d29e4dcdcf
commit b3474ec97d
29 changed files with 148 additions and 148 deletions
@@ -0,0 +1,15 @@
require "test_helper"
class Account::EntropiesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "update" do
put account_entropy_path, params: { entropy: { auto_postpone_period: 1.day } }
assert_equal 1.day, entropies("37s_account").auto_postpone_period
assert_redirected_to account_settings_path
end
end
@@ -1,15 +0,0 @@
require "test_helper"
class Account::EntropyConfigurationsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "update" do
put account_entropy_configuration_path, params: { entropy_configuration: { auto_postpone_period: 1.day } }
assert_equal 1.day, entropy_configurations("37s_account").auto_postpone_period
assert_redirected_to account_settings_path
end
end
@@ -0,0 +1,16 @@
require "test_helper"
class Collections::EntropiesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
@collection = collections(:writebook)
end
test "update" do
put collection_entropy_path(@collection), params: { collection: { auto_postpone_period: 1.day } }
assert_equal 1.day, @collection.entropy.reload.auto_postpone_period
assert_turbo_stream action: :replace, target: dom_id(@collection, :entropy)
end
end
@@ -1,16 +0,0 @@
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_postpone_period: 1.day } }
assert_equal 1.day, @collection.entropy_configuration.reload.auto_postpone_period
assert_turbo_stream action: :replace, target: dom_id(@collection, :entropy_configuration)
end
end
@@ -44,7 +44,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_postpone_period
assert_equal 1.day, entropies(:writebook_collection).auto_postpone_period
assert_not collections(:writebook).all_access?
end