mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-17 04:32:22 +00:00
Hold value of I18n.locale with ApplicationHelperSpec (#3474)
This commit is contained in:
parent
41fa53253c
commit
1a4860a57a
|
@ -18,6 +18,12 @@ describe ApplicationHelper do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'add_rtl_body_class' do
|
describe 'add_rtl_body_class' do
|
||||||
|
around do |example|
|
||||||
|
current_locale = I18n.locale
|
||||||
|
example.run
|
||||||
|
I18n.locale = current_locale
|
||||||
|
end
|
||||||
|
|
||||||
it 'adds rtl body class if locale is Arabic' do
|
it 'adds rtl body class if locale is Arabic' do
|
||||||
I18n.locale = :ar
|
I18n.locale = :ar
|
||||||
expect(helper.add_rtl_body_class('other classes')).to eq 'other classes rtl'
|
expect(helper.add_rtl_body_class('other classes')).to eq 'other classes rtl'
|
||||||
|
|
Loading…
Reference in a new issue