spec/mongoid/fields/localized_spec.rb in mongoid-5.1.3 vs spec/mongoid/fields/localized_spec.rb in mongoid-5.1.4

- old
+ new

@@ -172,9 +172,24 @@ it "returns nil" do expect(value).to be_nil end end + + context 'when fallbacks are empty' do + + before do + ::I18n.fallbacks[:de] = [ ] + end + + let(:value) do + field.demongoize({ 'de' => 'testen' }) + end + + it "returns the value" do + expect(value).to eq('testen') + end + end end end end end