aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/initializers/frameworks_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/initializers/frameworks_test.rb')
-rw-r--r--railties/test/application/initializers/frameworks_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb
index fbce97e1a9..1eb5fce384 100644
--- a/railties/test/application/initializers/frameworks_test.rb
+++ b/railties/test/application/initializers/frameworks_test.rb
@@ -50,6 +50,23 @@ module ApplicationTests
assert_equal "test.rails", ActionMailer::Base.default_url_options[:host]
end
+ test "uses the default queue for ActionMailer" do
+ require "#{app_path}/config/environment"
+ assert_kind_of Rails::Queueing::Container, ActionMailer::Base.queue
+ end
+
+ test "allows me to configure queue for ActionMailer" do
+ app_file "config/environments/development.rb", <<-RUBY
+ AppTemplate::Application.configure do
+ Rails.queue[:mailer] = Rails::Queueing::TestQueue.new
+ config.action_mailer.queue = Rails.queue[:mailer]
+ end
+ RUBY
+
+ require "#{app_path}/config/environment"
+ assert_kind_of Rails::Queueing::TestQueue, ActionMailer::Base.queue
+ end
+
test "does not include url helpers as action methods" do
app_file "config/routes.rb", <<-RUBY
AppTemplate::Application.routes.draw do