diff options
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 |