Browse Source

Fix randomly fail (similar #7219) (#7225)

pull/4/head
Yamagishi Kazutoshi 6 years ago
committed by Eugen Rochko
parent
commit
648d645c2f
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      spec/controllers/concerns/localized_spec.rb

+ 6
- 2
spec/controllers/concerns/localized_spec.rb View File

@ -11,13 +11,17 @@ describe ApplicationController, type: :controller do
end
end
around do |example|
current_locale = I18n.locale
example.run
I18n.locale = current_locale
end
before do
routes.draw { get 'success' => 'anonymous#success' }
end
shared_examples 'default locale' do
after { I18n.locale = I18n.default_locale }
it 'sets available and preferred language' do
request.headers['Accept-Language'] = 'ca-ES, fa'
get 'success'

Loading…
Cancel
Save