From b1d322ce7f85535217dbb6e0851bcc251363f72c Mon Sep 17 00:00:00 2001 From: Brewster Date: Mon, 13 Jun 2011 18:10:27 -0700 Subject: [PATCH] added dirty check for has_one --- spec/functional/mongoid/nested_attributes_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/functional/mongoid/nested_attributes_spec.rb b/spec/functional/mongoid/nested_attributes_spec.rb index bc570155c4..620e963f3a 100644 --- a/spec/functional/mongoid/nested_attributes_spec.rb +++ b/spec/functional/mongoid/nested_attributes_spec.rb @@ -3389,7 +3389,9 @@ before do pizza.update_attributes(params) end - + it "sets nested object to be dirty" do + pizza.crust.should be_type_changed + end it "sets nested attributes" do pizza.reload.crust.type.should == "Thick" end