Created
November 21, 2012 22:02
-
-
Save zgchurch/4128152 to your computer and use it in GitHub Desktop.
(my new) failing ActiveRecord test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb | |
index 3f08f9e..fe0d2cc 100644 | |
--- a/activerecord/test/cases/nested_attributes_test.rb | |
+++ b/activerecord/test/cases/nested_attributes_test.rb | |
@@ -1000,6 +1000,12 @@ class TestHasOneAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRe | |
ShipPart.create!(:ship => @ship, :name => "Stern") | |
assert_no_queries { @pirate.valid? } | |
end | |
+ | |
+ test "not sure yet" do | |
+ @pirate.attributes = {:ship_attributes => {:id => @ship.id, :parts_attributes => [{:id => @part.id, :trinkets_attributes => [{:id => @part.id, :name => "changed"}]}]}} | |
+ # puts @pirate.ship.parts.inspect | |
+ assert_equal "changed", @pirate.ship.parts.first.trinkets.first.name | |
+ end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This test fails, except when like 12 is not commented out. Something to do with calling inspect or puts'ing that thing causes AR to correctly use what's in memory, rather than (I believe) loading from the database.