Commit cd92e74cef27992471e550eea2d4891d4b49dca0
1 parent
ef114865
Exists in
colab
and in
4 other branches
Revert "[WIP] Fixing locale unit test"
This reverts commit 99457cf1ee4c3914314199a1eb83a58d4dd7b3cf.
Showing
2 changed files
with
2 additions
and
3 deletions
Show diff stats
config/application.rb
@@ -19,7 +19,6 @@ module Mezuro | @@ -19,7 +19,6 @@ module Mezuro | ||
19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
20 | config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] | 20 | config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] |
21 | # config.i18n.default_locale = :de | 21 | # config.i18n.default_locale = :de |
22 | - config.available_locales = ['en', 'pt-BR'] | ||
23 | config.i18n.enforce_available_locales = true | 22 | config.i18n.enforce_available_locales = true |
24 | 23 | ||
25 | # Do not swallow errors in after_commit/after_rollback callbacks. | 24 | # Do not swallow errors in after_commit/after_rollback callbacks. |
spec/controllers/home_controller_spec.rb
@@ -18,7 +18,7 @@ describe HomeController, :type => :controller do | @@ -18,7 +18,7 @@ describe HomeController, :type => :controller do | ||
18 | it 'should automatically use the language specified in the request headers' do | 18 | it 'should automatically use the language specified in the request headers' do |
19 | request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR' | 19 | request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR' |
20 | get :index | 20 | get :index |
21 | - expect(I18n.locale).to eq(:"pt-BR") | 21 | + expect(I18n.locale).to eq(:pt) |
22 | end | 22 | end |
23 | 23 | ||
24 | it 'should use a different region if still the best match' do | 24 | it 'should use a different region if still the best match' do |
@@ -28,7 +28,7 @@ describe HomeController, :type => :controller do | @@ -28,7 +28,7 @@ describe HomeController, :type => :controller do | ||
28 | end | 28 | end |
29 | 29 | ||
30 | it 'should use the default language if no available language matches the requested one' do | 30 | it 'should use the default language if no available language matches the requested one' do |
31 | - request.env['HTTP_ACCEPT_LANGUAGE'] = 'la' | 31 | + request.env['HTTP_ACCEPT_LANGUAGE'] = 'de' |
32 | get :index | 32 | get :index |
33 | expect(I18n.locale).to eq(:en) | 33 | expect(I18n.locale).to eq(:en) |
34 | end | 34 | end |