diff options
author | Thierry Joyal <thierry.joyal@gmail.com> | 2019-04-16 18:54:51 +0000 |
---|---|---|
committer | Thierry Joyal <thierry.joyal@gmail.com> | 2019-04-16 18:54:51 +0000 |
commit | 963d11a000437241c958f8af9b3de118e100f133 (patch) | |
tree | 9f1260b5b2faed6b8912a3833351501681ab0ddd /railties/test/application | |
parent | b49e38b76b0998b0a8312d8c08c98728d3de2006 (diff) | |
download | rails-963d11a000437241c958f8af9b3de118e100f133.tar.gz rails-963d11a000437241c958f8af9b3de118e100f133.tar.bz2 rails-963d11a000437241c958f8af9b3de118e100f133.zip |
[Rails::MailersController] Do not leak I18n global setting changes
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/mailer_previews_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/application/mailer_previews_test.rb b/railties/test/application/mailer_previews_test.rb index fb84276b8a..fa9ed868c4 100644 --- a/railties/test/application/mailer_previews_test.rb +++ b/railties/test/application/mailer_previews_test.rb @@ -515,6 +515,13 @@ module ApplicationTests assert_match '<option selected value="locale=ja">ja', last_response.body end + test "preview does not leak I18n global setting changes" do + I18n.with_locale(:en) do + get "/rails/mailers/notifier/foo.txt?locale=ja" + assert_equal :en, I18n.locale + end + end + test "mailer previews create correct links when loaded on a subdirectory" do mailer "notifier", <<-RUBY class Notifier < ActionMailer::Base |