diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-03-06 13:08:11 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2016-03-06 13:08:11 +0530 |
commit | 0c2ccc0f9bc84dad98643bb6e2b5350a8a829898 (patch) | |
tree | 5149c8bbce293e725b7d10220fae5e3d2d736202 | |
parent | 7fa15fe694561b862773456edc11964556fb913b (diff) | |
download | rails-0c2ccc0f9bc84dad98643bb6e2b5350a8a829898.tar.gz rails-0c2ccc0f9bc84dad98643bb6e2b5350a8a829898.tar.bz2 rails-0c2ccc0f9bc84dad98643bb6e2b5350a8a829898.zip |
- Added i18n test to verify assigning hash directly to fallbacks instead of using map
- Fixed test name for setting fallbacks to config.i18n.fallbacks = [{ :ca => :'es-ES' }]
-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 |