aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/configuration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/configuration_test.rb')
-rw-r--r--railties/test/application/configuration_test.rb22
1 files changed, 21 insertions, 1 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index f6bec3242a..38dda20bec 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -1708,7 +1708,7 @@ module ApplicationTests
app "development"
ActiveSupport::Dependencies.autoload_paths.each do |path|
assert_not_operator path, :ends_with?, "app/assets"
- assert_not_operator path, :ends_with?, "app/javascript"
+ assert_not_operator path, :ends_with?, "app/#{Rails.configuration.webpacker_path}"
end
end
@@ -1793,6 +1793,11 @@ module ApplicationTests
assert_equal [X, D], C.descendants
end
+ test "load_database_yaml returns blank hash if configuration file is blank" do
+ app_file "config/database.yml", ""
+ app "development"
+ assert_equal({}, Rails.application.config.load_database_yaml)
+ end
test "raises with proper error message if no database configuration found" do
FileUtils.rm("#{app_path}/config/database.yml")
@@ -2588,6 +2593,21 @@ module ApplicationTests
MESSAGE
end
+ test "ActiveStorage.draw_routes can be configured via config.active_storage.draw_routes" do
+ app_file "config/environments/development.rb", <<-RUBY
+ Rails.application.configure do
+ config.active_storage.draw_routes = false
+ end
+ RUBY
+
+ output = rails("routes")
+ assert_not_includes(output, "rails_service_blob")
+ assert_not_includes(output, "rails_blob_representation")
+ assert_not_includes(output, "rails_disk_service")
+ assert_not_includes(output, "update_rails_disk_service")
+ assert_not_includes(output, "rails_direct_uploads")
+ end
+
test "hosts include .localhost in development" do
app "development"
assert_includes Rails.application.config.hosts, ".localhost"