mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #5043 from luisramos0/fix_cookies
Fix cookies policy helper spec in rails 4
This commit is contained in:
@@ -33,6 +33,14 @@ module Web
|
||||
end
|
||||
|
||||
describe "language from locale" do
|
||||
# keeps global state unchanged
|
||||
around do |example|
|
||||
original_available_locales = I18n.available_locales
|
||||
I18n.available_locales = ['en', 'en_GB', '']
|
||||
example.run
|
||||
I18n.available_locales = original_available_locales
|
||||
end
|
||||
|
||||
scenario "when locale is the language" do
|
||||
I18n.locale = "en"
|
||||
expect(helper.locale_language).to eq "en"
|
||||
|
||||
Reference in New Issue
Block a user