Reset `I18n.locale` in tests.
This commit is contained in:
parent
72ccb4e11d
commit
40b83ebb47
|
@ -18,6 +18,7 @@ describe JsLocaleHelper do
|
||||||
JsLocaleHelper.extend StubLoadTranslations
|
JsLocaleHelper.extend StubLoadTranslations
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
I18n.locale = :en
|
||||||
JsLocaleHelper.clear_cache!
|
JsLocaleHelper.clear_cache!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,13 @@ describe Badge do
|
||||||
badge = Badge.find_by_name("Basic User")
|
badge = Badge.find_by_name("Basic User")
|
||||||
name_english = badge.name
|
name_english = badge.name
|
||||||
|
|
||||||
I18n.locale = 'fr'
|
begin
|
||||||
|
I18n.locale = 'fr'
|
||||||
|
|
||||||
expect(badge.display_name).not_to eq(name_english)
|
expect(badge.display_name).not_to eq(name_english)
|
||||||
|
ensure
|
||||||
|
I18n.locale = :en
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'handles changes on badge description and long description correctly for system badges' do
|
it 'handles changes on badge description and long description correctly for system badges' do
|
||||||
|
|
Loading…
Reference in New Issue