mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Reset I18n.local for each spec
This avoids a locale setting leaking from one spec to another. It also means that we don't have to reset the locale in individual specs. Also: - `cookies` is reset automatically and we don't need to do that. - Removed some unused code (German number format and helper methods).
This commit is contained in:
@@ -59,16 +59,6 @@ describe Spree::Variant do
|
||||
end
|
||||
|
||||
context "price parsing" do
|
||||
around(:each) do |spec|
|
||||
default_locale = I18n.default_locale
|
||||
I18n.with_locale(default_locale) do
|
||||
I18n.backend.store_translations(:de,
|
||||
{ number: { currency: { format: { delimiter: '.',
|
||||
separator: ',' } } } })
|
||||
spec.run
|
||||
end
|
||||
end
|
||||
|
||||
context "price=" do
|
||||
context "with decimal point" do
|
||||
it "captures the proper amount for a formatted price" do
|
||||
|
||||
Reference in New Issue
Block a user