mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-24 05:25:08 +01:00
parent
3fa3161472
commit
648d645c2f
@ -11,13 +11,17 @@ describe ApplicationController, type: :controller do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
around do |example|
|
||||||
|
current_locale = I18n.locale
|
||||||
|
example.run
|
||||||
|
I18n.locale = current_locale
|
||||||
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
routes.draw { get 'success' => 'anonymous#success' }
|
routes.draw { get 'success' => 'anonymous#success' }
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'default locale' do
|
shared_examples 'default locale' do
|
||||||
after { I18n.locale = I18n.default_locale }
|
|
||||||
|
|
||||||
it 'sets available and preferred language' do
|
it 'sets available and preferred language' do
|
||||||
request.headers['Accept-Language'] = 'ca-ES, fa'
|
request.headers['Accept-Language'] = 'ca-ES, fa'
|
||||||
get 'success'
|
get 'success'
|
||||||
|
Loading…
Reference in New Issue
Block a user