spec/lib/babelyoda/localization_value_spec.rb in babelyoda-2.1.9 vs spec/lib/babelyoda/localization_value_spec.rb in babelyoda-2.1.10

- old
+ new

@@ -12,9 +12,17 @@ value2 = Babelyoda::LocalizationValue.new(:en, "Value 2") value1.merge!(value2) value1.language.should == :en value1.text.should == "Value 2" end + + it "should merge values if allowed so in options and the status == :translation_required" do + value1 = Babelyoda::LocalizationValue.new(:en, "Value 1") + value2 = Babelyoda::LocalizationValue.new(:en, "Value 2") + value1.merge!(value2, { preserve: false }) + value1.language.should == :en + value1.text.should == "Value 2" + end it "should preserve values if specified so in options and the status != :translation_required" do value1 = Babelyoda::LocalizationValue.new(:en, "Value 1") value1.status = :translated value2 = Babelyoda::LocalizationValue.new(:en, "Value 2")