diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2019-07-22 13:16:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-22 13:16:55 -0400 |
commit | 2ee75971ef52a0c8faedf32f28b66bf64efa6a49 (patch) | |
tree | b3d5537d6fe9e84ece34ef1bf4cb4e3d70226fc7 /railties/test | |
parent | 3b36d75c8fef2e8d3bc9db87486729d4e8229840 (diff) | |
parent | 3cf65bcb8ee3c27204dee5cac003a749973240f9 (diff) | |
download | rails-2ee75971ef52a0c8faedf32f28b66bf64efa6a49.tar.gz rails-2ee75971ef52a0c8faedf32f28b66bf64efa6a49.tar.bz2 rails-2ee75971ef52a0c8faedf32f28b66bf64efa6a49.zip |
Merge pull request #36666 from gmcgibbon/allow_disabling_active_storage_routes
Make Active Storage routes optional
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index a05d86f738..96678c395c 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -2593,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" |