diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-12-05 12:46:22 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-12-05 13:19:51 +0100 |
commit | 73b57a515f650595b21b9f26b4a5a3c9c982691e (patch) | |
tree | 537593924b3da1aadc30f9722af4dbf65f9c7019 /railties/test/application/initializers | |
parent | d71c1fc6a7f4a7fcdb84b8c091fb29c53b09dc68 (diff) | |
download | rails-73b57a515f650595b21b9f26b4a5a3c9c982691e.tar.gz rails-73b57a515f650595b21b9f26b4a5a3c9c982691e.tar.bz2 rails-73b57a515f650595b21b9f26b4a5a3c9c982691e.zip |
set `i18n.enforce_available_locales` before `i18n.default_locale`.
Diffstat (limited to 'railties/test/application/initializers')
-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 |