-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
class ContentElement include Mongoid::Document field :title, :type => String validates :title, :uniqueness => true end
If it test that with this spec
describe ContentElement do it "is only valid with a unique name" do contentElement1 = ContentElement.create :title => "ups" contentElement2 = ContentElement.new :title => "ups" contentElement2.save.should_not be_true end describe "#clone" do it "is only valid with a unique name" do contentElement1 = ContentElement.create :title => "ups" contentElement2 = contentElement1.clone contentElement2.save.should_not be_true end end end
First spec is green, but second is red, it says that the clone is valid - but should not be valid.
With 2.3.4 everything was fine, but after updating to 2.4.3 it was broken.