From ccc3ddb7762bae0df7e2f8d643b19b6a4769d5be Mon Sep 17 00:00:00 2001 From: Oleg Date: Wed, 3 Dec 2014 10:43:12 -0500 Subject: fixing mailer previews for apps with globbing route --- railties/test/application/mailer_previews_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'railties') diff --git a/railties/test/application/mailer_previews_test.rb b/railties/test/application/mailer_previews_test.rb index 55e917c3ec..9e4f858539 100644 --- a/railties/test/application/mailer_previews_test.rb +++ b/railties/test/application/mailer_previews_test.rb @@ -40,6 +40,17 @@ module ApplicationTests assert_equal 404, last_response.status end + test "/rails/mailers is accessible with globbing route present" do + app_file "config/routes.rb", <<-RUBY + Rails.application.routes.draw do + get '*foo', to: 'foo#index' + end + RUBY + app("development") + get "/rails/mailers" + assert_equal 200, last_response.status + end + test "mailer previews are loaded from the default preview_path" do mailer 'notifier', <<-RUBY class Notifier < ActionMailer::Base -- cgit v1.2.3