diff options
author | George Claghorn <george@basecamp.com> | 2018-12-24 15:16:22 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-12-25 21:32:35 -0500 |
commit | a5b2fff64ca0c1fa7be5124f40a251d991c10a85 (patch) | |
tree | 33a79841402b7151e52d9ad3949ce54f320c10aa /railties/test | |
parent | 4298df00ae6219b9b5b7c40f281d4fa4d66f4383 (diff) | |
parent | dcddff1d2d0c695318670686a27429a76f20ae03 (diff) | |
download | rails-a5b2fff64ca0c1fa7be5124f40a251d991c10a85.tar.gz rails-a5b2fff64ca0c1fa7be5124f40a251d991c10a85.tar.bz2 rails-a5b2fff64ca0c1fa7be5124f40a251d991c10a85.zip |
Import Action Mailbox
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/rake/routes_test.rb | 29 | ||||
-rw-r--r-- | railties/test/commands/routes_test.rb | 321 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 | ||||
-rw-r--r-- | railties/test/railties/engine_test.rb | 8 |
4 files changed, 236 insertions, 124 deletions
diff --git a/railties/test/application/rake/routes_test.rb b/railties/test/application/rake/routes_test.rb index 2c23ff4679..933c735078 100644 --- a/railties/test/application/rake/routes_test.rb +++ b/railties/test/application/rake/routes_test.rb @@ -6,6 +6,7 @@ module ApplicationTests module RakeTests class RakeRoutesTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation + setup :build_app teardown :teardown_app @@ -17,13 +18,27 @@ module ApplicationTests RUBY assert_equal <<~MESSAGE, run_rake_routes - Prefix Verb URI Pattern Controller#Action - cart GET /cart(.:format) cart#show - rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show -rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show - rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show -update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update - rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create + Prefix Verb URI Pattern Controller#Action + cart GET /cart(.:format) cart#show + rails_amazon_inbound_emails POST /rails/action_mailbox/amazon/inbound_emails(.:format) action_mailbox/ingresses/amazon/inbound_emails#create + rails_mandrill_inbound_emails POST /rails/action_mailbox/mandrill/inbound_emails(.:format) action_mailbox/ingresses/mandrill/inbound_emails#create + rails_postfix_inbound_emails POST /rails/action_mailbox/postfix/inbound_emails(.:format) action_mailbox/ingresses/postfix/inbound_emails#create + rails_sendgrid_inbound_emails POST /rails/action_mailbox/sendgrid/inbound_emails(.:format) action_mailbox/ingresses/sendgrid/inbound_emails#create + rails_mailgun_inbound_emails POST /rails/action_mailbox/mailgun/inbound_emails/mime(.:format) action_mailbox/ingresses/mailgun/inbound_emails#create + rails_conductor_inbound_emails GET /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#index + POST /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#create + new_rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/new(.:format) rails/conductor/action_mailbox/inbound_emails#new + edit_rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id/edit(.:format) rails/conductor/action_mailbox/inbound_emails#edit + rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#show + PATCH /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#update + PUT /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#update + DELETE /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#destroy + rails_conductor_inbound_email_reroute POST /rails/conductor/action_mailbox/:inbound_email_id/reroute(.:format) rails/conductor/action_mailbox/reroutes#create + rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show + rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show + rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show + update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update + rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create MESSAGE end diff --git a/railties/test/commands/routes_test.rb b/railties/test/commands/routes_test.rb index 9efab27b38..a43a6d32b9 100644 --- a/railties/test/commands/routes_test.rb +++ b/railties/test/commands/routes_test.rb @@ -17,29 +17,28 @@ class Rails::Command::RoutesTest < ActiveSupport::TestCase end RUBY - expected_post_output = [" Prefix Verb URI Pattern Controller#Action", - " new_post GET /post/new(.:format) posts#new", - "edit_post GET /post/edit(.:format) posts#edit", - " post GET /post(.:format) posts#show", - " PATCH /post(.:format) posts#update", - " PUT /post(.:format) posts#update", - " DELETE /post(.:format) posts#destroy", - " POST /post(.:format) posts#create\n"].join("\n") - - output = run_routes_command(["-c", "PostController"]) - assert_equal expected_post_output, output - - expected_perm_output = [" Prefix Verb URI Pattern Controller#Action", - " new_user_permission GET /user_permission/new(.:format) user_permissions#new", - "edit_user_permission GET /user_permission/edit(.:format) user_permissions#edit", - " user_permission GET /user_permission(.:format) user_permissions#show", - " PATCH /user_permission(.:format) user_permissions#update", - " PUT /user_permission(.:format) user_permissions#update", - " DELETE /user_permission(.:format) user_permissions#destroy", - " POST /user_permission(.:format) user_permissions#create\n"].join("\n") - - output = run_routes_command(["-c", "UserPermissionController"]) - assert_equal expected_perm_output, output + assert_equal <<~OUTPUT, run_routes_command([ "-c", "PostController" ]) + Prefix Verb URI Pattern Controller#Action + new_post GET /post/new(.:format) posts#new + edit_post GET /post/edit(.:format) posts#edit + post GET /post(.:format) posts#show + PATCH /post(.:format) posts#update + PUT /post(.:format) posts#update + DELETE /post(.:format) posts#destroy + POST /post(.:format) posts#create + rails_postfix_inbound_emails POST /rails/action_mailbox/postfix/inbound_emails(.:format) action_mailbox/ingresses/postfix/inbound_emails#create + OUTPUT + + assert_equal <<~OUTPUT, run_routes_command([ "-c", "UserPermissionController" ]) + Prefix Verb URI Pattern Controller#Action + new_user_permission GET /user_permission/new(.:format) user_permissions#new + edit_user_permission GET /user_permission/edit(.:format) user_permissions#edit + user_permission GET /user_permission(.:format) user_permissions#show + PATCH /user_permission(.:format) user_permissions#update + PUT /user_permission(.:format) user_permissions#update + DELETE /user_permission(.:format) user_permissions#destroy + POST /user_permission(.:format) user_permissions#create + OUTPUT end test "rails routes with global search key" do @@ -51,25 +50,32 @@ class Rails::Command::RoutesTest < ActiveSupport::TestCase end RUBY - output = run_routes_command(["-g", "show"]) - assert_equal <<~MESSAGE, output - Prefix Verb URI Pattern Controller#Action - cart GET /cart(.:format) cart#show - rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show - rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show - rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show + assert_equal <<~MESSAGE, run_routes_command([ "-g", "show" ]) + Prefix Verb URI Pattern Controller#Action + cart GET /cart(.:format) cart#show + rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#show + rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show + rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show + rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show MESSAGE - output = run_routes_command(["-g", "POST"]) - assert_equal <<~MESSAGE, output - Prefix Verb URI Pattern Controller#Action - POST /cart(.:format) cart#create - rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create + assert_equal <<~MESSAGE, run_routes_command([ "-g", "POST" ]) + Prefix Verb URI Pattern Controller#Action + POST /cart(.:format) cart#create + rails_amazon_inbound_emails POST /rails/action_mailbox/amazon/inbound_emails(.:format) action_mailbox/ingresses/amazon/inbound_emails#create + rails_mandrill_inbound_emails POST /rails/action_mailbox/mandrill/inbound_emails(.:format) action_mailbox/ingresses/mandrill/inbound_emails#create + rails_postfix_inbound_emails POST /rails/action_mailbox/postfix/inbound_emails(.:format) action_mailbox/ingresses/postfix/inbound_emails#create + rails_sendgrid_inbound_emails POST /rails/action_mailbox/sendgrid/inbound_emails(.:format) action_mailbox/ingresses/sendgrid/inbound_emails#create + rails_mailgun_inbound_emails POST /rails/action_mailbox/mailgun/inbound_emails/mime(.:format) action_mailbox/ingresses/mailgun/inbound_emails#create + POST /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#create + rails_conductor_inbound_email_reroute POST /rails/conductor/action_mailbox/:inbound_email_id/reroute(.:format) rails/conductor/action_mailbox/reroutes#create + rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create MESSAGE - output = run_routes_command(["-g", "basketballs"]) - assert_equal " Prefix Verb URI Pattern Controller#Action\n" \ - "basketballs GET /basketballs(.:format) basketball#index\n", output + assert_equal <<~MESSAGE, run_routes_command([ "-g", "basketballs" ]) + Prefix Verb URI Pattern Controller#Action + basketballs GET /basketballs(.:format) basketball#index + MESSAGE end test "rails routes with controller search key" do @@ -113,35 +119,42 @@ class Rails::Command::RoutesTest < ActiveSupport::TestCase end RUBY - expected_post_output = [" Prefix Verb URI Pattern Controller#Action", - " new_admin_post GET /admin/post/new(.:format) admin/posts#new", - "edit_admin_post GET /admin/post/edit(.:format) admin/posts#edit", - " admin_post GET /admin/post(.:format) admin/posts#show", - " PATCH /admin/post(.:format) admin/posts#update", - " PUT /admin/post(.:format) admin/posts#update", - " DELETE /admin/post(.:format) admin/posts#destroy", - " POST /admin/post(.:format) admin/posts#create\n"].join("\n") - - output = run_routes_command(["-c", "Admin::PostController"]) - assert_equal expected_post_output, output - - output = run_routes_command(["-c", "PostController"]) - assert_equal expected_post_output, output - - expected_perm_output = [" Prefix Verb URI Pattern Controller#Action", - " new_admin_user_permission GET /admin/user_permission/new(.:format) admin/user_permissions#new", - "edit_admin_user_permission GET /admin/user_permission/edit(.:format) admin/user_permissions#edit", - " admin_user_permission GET /admin/user_permission(.:format) admin/user_permissions#show", - " PATCH /admin/user_permission(.:format) admin/user_permissions#update", - " PUT /admin/user_permission(.:format) admin/user_permissions#update", - " DELETE /admin/user_permission(.:format) admin/user_permissions#destroy", - " POST /admin/user_permission(.:format) admin/user_permissions#create\n"].join("\n") - - output = run_routes_command(["-c", "Admin::UserPermissionController"]) - assert_equal expected_perm_output, output - - output = run_routes_command(["-c", "UserPermissionController"]) - assert_equal expected_perm_output, output + assert_equal <<~OUTPUT, run_routes_command([ "-c", "Admin::PostController" ]) + Prefix Verb URI Pattern Controller#Action + new_admin_post GET /admin/post/new(.:format) admin/posts#new + edit_admin_post GET /admin/post/edit(.:format) admin/posts#edit + admin_post GET /admin/post(.:format) admin/posts#show + PATCH /admin/post(.:format) admin/posts#update + PUT /admin/post(.:format) admin/posts#update + DELETE /admin/post(.:format) admin/posts#destroy + POST /admin/post(.:format) admin/posts#create + OUTPUT + + assert_equal <<~OUTPUT, run_routes_command([ "-c", "PostController" ]) + Prefix Verb URI Pattern Controller#Action + new_admin_post GET /admin/post/new(.:format) admin/posts#new + edit_admin_post GET /admin/post/edit(.:format) admin/posts#edit + admin_post GET /admin/post(.:format) admin/posts#show + PATCH /admin/post(.:format) admin/posts#update + PUT /admin/post(.:format) admin/posts#update + DELETE /admin/post(.:format) admin/posts#destroy + POST /admin/post(.:format) admin/posts#create + rails_postfix_inbound_emails POST /rails/action_mailbox/postfix/inbound_emails(.:format) action_mailbox/ingresses/postfix/inbound_emails#create + OUTPUT + + expected_permission_output = <<~OUTPUT + Prefix Verb URI Pattern Controller#Action + new_admin_user_permission GET /admin/user_permission/new(.:format) admin/user_permissions#new + edit_admin_user_permission GET /admin/user_permission/edit(.:format) admin/user_permissions#edit + admin_user_permission GET /admin/user_permission(.:format) admin/user_permissions#show + PATCH /admin/user_permission(.:format) admin/user_permissions#update + PUT /admin/user_permission(.:format) admin/user_permissions#update + DELETE /admin/user_permission(.:format) admin/user_permissions#destroy + POST /admin/user_permission(.:format) admin/user_permissions#create + OUTPUT + + assert_equal expected_permission_output, run_routes_command([ "-c", "Admin::UserPermissionController" ]) + assert_equal expected_permission_output, run_routes_command([ "-c", "UserPermissionController" ]) end test "rails routes displays message when no routes are defined" do @@ -151,12 +164,26 @@ class Rails::Command::RoutesTest < ActiveSupport::TestCase RUBY assert_equal <<~MESSAGE, run_routes_command - Prefix Verb URI Pattern Controller#Action - rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show - rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show - rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show - update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update - rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create + Prefix Verb URI Pattern Controller#Action + rails_amazon_inbound_emails POST /rails/action_mailbox/amazon/inbound_emails(.:format) action_mailbox/ingresses/amazon/inbound_emails#create + rails_mandrill_inbound_emails POST /rails/action_mailbox/mandrill/inbound_emails(.:format) action_mailbox/ingresses/mandrill/inbound_emails#create + rails_postfix_inbound_emails POST /rails/action_mailbox/postfix/inbound_emails(.:format) action_mailbox/ingresses/postfix/inbound_emails#create + rails_sendgrid_inbound_emails POST /rails/action_mailbox/sendgrid/inbound_emails(.:format) action_mailbox/ingresses/sendgrid/inbound_emails#create + rails_mailgun_inbound_emails POST /rails/action_mailbox/mailgun/inbound_emails/mime(.:format) action_mailbox/ingresses/mailgun/inbound_emails#create + rails_conductor_inbound_emails GET /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#index + POST /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#create + new_rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/new(.:format) rails/conductor/action_mailbox/inbound_emails#new + edit_rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id/edit(.:format) rails/conductor/action_mailbox/inbound_emails#edit + rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#show + PATCH /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#update + PUT /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#update + DELETE /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#destroy + rails_conductor_inbound_email_reroute POST /rails/conductor/action_mailbox/:inbound_email_id/reroute(.:format) rails/conductor/action_mailbox/reroutes#create + rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show + rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show + rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show + update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update + rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create MESSAGE end @@ -165,45 +192,115 @@ class Rails::Command::RoutesTest < ActiveSupport::TestCase IO.console.winsize = [0, 27] app_file "config/routes.rb", <<-RUBY - Rails.application.routes.draw do - get '/cart', to: 'cart#show' - end - RUBY - - output = run_routes_command(["--expanded"]) - - assert_equal <<~MESSAGE, output - --[ Route 1 ]-------------- - Prefix | cart - Verb | GET - URI | /cart(.:format) - Controller#Action | cart#show - --[ Route 2 ]-------------- - Prefix | rails_service_blob - Verb | GET - URI | /rails/active_storage/blobs/:signed_id/*filename(.:format) - Controller#Action | active_storage/blobs#show - --[ Route 3 ]-------------- - Prefix | rails_blob_representation - Verb | GET - URI | /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) - Controller#Action | active_storage/representations#show - --[ Route 4 ]-------------- - Prefix | rails_disk_service - Verb | GET - URI | /rails/active_storage/disk/:encoded_key/*filename(.:format) - Controller#Action | active_storage/disk#show - --[ Route 5 ]-------------- - Prefix | update_rails_disk_service - Verb | PUT - URI | /rails/active_storage/disk/:encoded_token(.:format) - Controller#Action | active_storage/disk#update - --[ Route 6 ]-------------- - Prefix | rails_direct_uploads - Verb | POST - URI | /rails/active_storage/direct_uploads(.:format) - Controller#Action | active_storage/direct_uploads#create - MESSAGE + Rails.application.routes.draw do + get '/cart', to: 'cart#show' + end + RUBY + + # rubocop:disable Layout/TrailingWhitespace + assert_equal <<~MESSAGE, run_routes_command([ "--expanded" ]) + --[ Route 1 ]-------------- + Prefix | cart + Verb | GET + URI | /cart(.:format) + Controller#Action | cart#show + --[ Route 2 ]-------------- + Prefix | rails_amazon_inbound_emails + Verb | POST + URI | /rails/action_mailbox/amazon/inbound_emails(.:format) + Controller#Action | action_mailbox/ingresses/amazon/inbound_emails#create + --[ Route 3 ]-------------- + Prefix | rails_mandrill_inbound_emails + Verb | POST + URI | /rails/action_mailbox/mandrill/inbound_emails(.:format) + Controller#Action | action_mailbox/ingresses/mandrill/inbound_emails#create + --[ Route 4 ]-------------- + Prefix | rails_postfix_inbound_emails + Verb | POST + URI | /rails/action_mailbox/postfix/inbound_emails(.:format) + Controller#Action | action_mailbox/ingresses/postfix/inbound_emails#create + --[ Route 5 ]-------------- + Prefix | rails_sendgrid_inbound_emails + Verb | POST + URI | /rails/action_mailbox/sendgrid/inbound_emails(.:format) + Controller#Action | action_mailbox/ingresses/sendgrid/inbound_emails#create + --[ Route 6 ]-------------- + Prefix | rails_mailgun_inbound_emails + Verb | POST + URI | /rails/action_mailbox/mailgun/inbound_emails/mime(.:format) + Controller#Action | action_mailbox/ingresses/mailgun/inbound_emails#create + --[ Route 7 ]-------------- + Prefix | rails_conductor_inbound_emails + Verb | GET + URI | /rails/conductor/action_mailbox/inbound_emails(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#index + --[ Route 8 ]-------------- + Prefix | + Verb | POST + URI | /rails/conductor/action_mailbox/inbound_emails(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#create + --[ Route 9 ]-------------- + Prefix | new_rails_conductor_inbound_email + Verb | GET + URI | /rails/conductor/action_mailbox/inbound_emails/new(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#new + --[ Route 10 ]------------- + Prefix | edit_rails_conductor_inbound_email + Verb | GET + URI | /rails/conductor/action_mailbox/inbound_emails/:id/edit(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#edit + --[ Route 11 ]------------- + Prefix | rails_conductor_inbound_email + Verb | GET + URI | /rails/conductor/action_mailbox/inbound_emails/:id(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#show + --[ Route 12 ]------------- + Prefix | + Verb | PATCH + URI | /rails/conductor/action_mailbox/inbound_emails/:id(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#update + --[ Route 13 ]------------- + Prefix | + Verb | PUT + URI | /rails/conductor/action_mailbox/inbound_emails/:id(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#update + --[ Route 14 ]------------- + Prefix | + Verb | DELETE + URI | /rails/conductor/action_mailbox/inbound_emails/:id(.:format) + Controller#Action | rails/conductor/action_mailbox/inbound_emails#destroy + --[ Route 15 ]------------- + Prefix | rails_conductor_inbound_email_reroute + Verb | POST + URI | /rails/conductor/action_mailbox/:inbound_email_id/reroute(.:format) + Controller#Action | rails/conductor/action_mailbox/reroutes#create + --[ Route 16 ]------------- + Prefix | rails_service_blob + Verb | GET + URI | /rails/active_storage/blobs/:signed_id/*filename(.:format) + Controller#Action | active_storage/blobs#show + --[ Route 17 ]------------- + Prefix | rails_blob_representation + Verb | GET + URI | /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) + Controller#Action | active_storage/representations#show + --[ Route 18 ]------------- + Prefix | rails_disk_service + Verb | GET + URI | /rails/active_storage/disk/:encoded_key/*filename(.:format) + Controller#Action | active_storage/disk#show + --[ Route 19 ]------------- + Prefix | update_rails_disk_service + Verb | PUT + URI | /rails/active_storage/disk/:encoded_token(.:format) + Controller#Action | active_storage/disk#update + --[ Route 20 ]------------- + Prefix | rails_direct_uploads + Verb | POST + URI | /rails/active_storage/direct_uploads(.:format) + Controller#Action | active_storage/direct_uploads#create + MESSAGE + # rubocop:enable Layout/TrailingWhitespace ensure IO.console.winsize = previous_console_winsize end diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 4523b66dda..7d4a26ff9d 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -430,7 +430,7 @@ module TestHelpers end def use_frameworks(arr) - to_remove = [:actionmailer, :activerecord, :activestorage, :activejob] - arr + to_remove = [:actionmailer, :activerecord, :activestorage, :activejob, :actionmailbox] - arr if to_remove.include?(:activerecord) remove_from_config "config.active_record.*" diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 4ac8f8d741..ca77c3a786 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -90,8 +90,8 @@ module RailtiesTest boot_rails Dir.chdir(app_path) do - # Install Active Storage migration file first so as not to affect test. - `bundle exec rake active_storage:install` + # Install Active Storage and Action Mailbox migration files first so as not to affect test. + `bundle exec rake active_storage:install action_mailbox:install` output = `bundle exec rake bukkits:install:migrations` ["CreateUsers", "AddLastNameToUsers", "CreateSessions"].each do |migration_name| @@ -177,8 +177,8 @@ module RailtiesTest boot_rails Dir.chdir(app_path) do - # Install Active Storage migration file first so as not to affect test. - `bundle exec rake active_storage:install` + # Install Active Storage and Action Mailbox migrations first so as not to affect test. + `bundle exec rake active_storage:install action_mailbox:install` output = `bundle exec rake railties:install:migrations`.split("\n") assert_match(/Copied migration \d+_create_users\.core_engine\.rb from core_engine/, output.first) |