-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Tests
-
None
There are a bunch of fallback related errors, that appear to be the result of not resetting the fallbacks to [] after setting them:
1) Mongoid::Fields#{field}_translations when the field is localized when translations exist returns all the translations Failure/Error: expect(translations).to eq( { "en" => "test", "de" => "The best" } ) expected: {"de"=>"The best", "en"=>"test"} got: {"de"=>"The best", "ru"=>"test"} (compared using ==) Diff: @@ -1,3 +1,3 @@ "de" => "The best", -"en" => "test", +"ru" => "test", # ./spec/mongoid/fields_spec.rb:34:in `block (5 levels) in <top (required)>' # ./spec/support/macros.rb:26:in `block in config_override' 2) Mongoid::Fields localize: :present when assigning an empty string assigns the value Failure/Error: expect(product.title).to eq(nil) expected: nil got: "hello" (compared using ==) # ./spec/mongoid/fields_spec.rb:2004:in `block (4 levels) in <top (required)>' # ./spec/support/macros.rb:26:in `block in config_override' 3) Mongoid::Fields localize: :present when assigning nil assigns the value Failure/Error: expect(product.title).to eq(nil) expected: nil got: "hello" (compared using ==) # ./spec/mongoid/fields_spec.rb:2027:in `block (4 levels) in <top (required)>' # ./spec/support/macros.rb:26:in `block in config_override' 4) Mongoid::Fields localize: :present when assigning an empty array assigns the value Failure/Error: expect(product.title).to eq(nil) expected: nil got: "hello" (compared using ==) # ./spec/mongoid/fields_spec.rb:2050:in `block (4 levels) in <top (required)>' # ./spec/support/macros.rb:26:in `block in config_override'
- duplicates
-
MONGOID-5438 Implement local override for i18n parameters
- Closed