diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-03-06 11:21:04 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-03-06 11:21:04 +0100 |
commit | af80974f85f8ffb54e7aa2aea8e171f36c3a7ab3 (patch) | |
tree | b6053e6bc668a86098387d7e71a86933fcdd7859 | |
parent | fbf3411b11762db4bf80dc8695863e623515c701 (diff) | |
parent | 0c2ccc0f9bc84dad98643bb6e2b5350a8a829898 (diff) | |
download | rails-af80974f85f8ffb54e7aa2aea8e171f36c3a7ab3.tar.gz rails-af80974f85f8ffb54e7aa2aea8e171f36c3a7ab3.tar.bz2 rails-af80974f85f8ffb54e7aa2aea8e171f36c3a7ab3.zip |
Merge pull request #24085 from vipulnsward/i18n-test-addition
i18n fallbacks test fixes
-rw-r--r-- | railties/test/application/initializers/i18n_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb index ab7f29b0f2..0f9bb41053 100644 --- a/railties/test/application/initializers/i18n_test.rb +++ b/railties/test/application/initializers/i18n_test.rb @@ -245,7 +245,7 @@ fr: assert_fallbacks de: [:de, :'en-US', :en] end - test "[shortcut] config.i18n.fallbacks = [{ :ca => :'es-ES' }] initializes fallbacks with a mapping de-AT => de-DE" do + test "[shortcut] config.i18n.fallbacks = [{ :ca => :'es-ES' }] initializes fallbacks with a mapping ca => es-ES" do I18n::Railtie.config.i18n.fallbacks.map = { :ca => :'es-ES' } load_app assert_fallbacks ca: [:ca, :"es-ES", :es, :en] @@ -257,6 +257,12 @@ fr: assert_fallbacks ca: [:ca, :"es-ES", :es, :'en-US', :en] end + test "[shortcut] config.i18n.fallbacks = { ca: :en } initializes fallbacks with a mapping ca => :en" do + I18n::Railtie.config.i18n.fallbacks = { ca: :en } + load_app + assert_fallbacks ca: [:ca, :en] + end + test "disable config.i18n.enforce_available_locales" do add_to_config <<-RUBY config.i18n.enforce_available_locales = false |