diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-05 04:27:19 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-05 04:27:19 -0800 |
commit | f0c58621f104492aa1c2b6cb13ecb2d6c60541fa (patch) | |
tree | 537593924b3da1aadc30f9722af4dbf65f9c7019 /railties/test/application/initializers/i18n_test.rb | |
parent | d71c1fc6a7f4a7fcdb84b8c091fb29c53b09dc68 (diff) | |
parent | 73b57a515f650595b21b9f26b4a5a3c9c982691e (diff) | |
download | rails-f0c58621f104492aa1c2b6cb13ecb2d6c60541fa.tar.gz rails-f0c58621f104492aa1c2b6cb13ecb2d6c60541fa.tar.bz2 rails-f0c58621f104492aa1c2b6cb13ecb2d6c60541fa.zip |
Merge pull request #13190 from senny/set_enforce_available_locales_first
Set `i18n.enforce_available_locales` before any other configuration option.
Diffstat (limited to 'railties/test/application/initializers/i18n_test.rb')
-rw-r--r-- | railties/test/application/initializers/i18n_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb index 97df073ec7..2a64cd8ba7 100644 --- a/railties/test/application/initializers/i18n_test.rb +++ b/railties/test/application/initializers/i18n_test.rb @@ -183,5 +183,16 @@ en: load_app assert_fallbacks ca: [:ca, :"es-ES", :es, :'en-US', :en] end + + test "config.i18n.enforce_available_locales is set before config.i18n.default_locale is" do + add_to_config <<-RUBY + config.i18n.default_locale = :it + config.i18n.enforce_available_locales = true + RUBY + + assert_raises(I18n::InvalidLocale) do + load_app + end + end end end |