aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_one_through_associations_test.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-05-18 11:18:46 -0300
committerEmilio Tagua <miloops@gmail.com>2009-05-18 11:18:46 -0300
commita04dedd5634cbb602cf48938cee0ff11c046b4c2 (patch)
tree66c51731cc283310362db57503d4952e0a0213bb /activerecord/test/cases/associations/has_one_through_associations_test.rb
parent0048897a417774f7e5a0c8c9e82fc8684f94ebc1 (diff)
parent27de7f150b57a18d4ccdd274f6f8b621b58108c6 (diff)
downloadrails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.gz
rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.bz2
rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.zip
Merge commit 'rails/master'
Conflicts: activerecord/lib/active_record/base.rb activerecord/lib/active_record/migration.rb activerecord/test/cases/helper.rb
Diffstat (limited to 'activerecord/test/cases/associations/has_one_through_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_one_through_associations_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_one_through_associations_test.rb b/activerecord/test/cases/associations/has_one_through_associations_test.rb
index 12c598751b..ab6e6d20fc 100644
--- a/activerecord/test/cases/associations/has_one_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_through_associations_test.rb
@@ -43,7 +43,14 @@ class HasOneThroughAssociationsTest < ActiveRecord::TestCase
@member.reload
end
end
-
+
+ def test_set_record_to_nil_should_delete_association
+ @member.club = nil
+ @member.reload
+ assert_equal nil, @member.current_membership
+ assert_nil @member.club
+ end
+
def test_has_one_through_polymorphic
assert_equal clubs(:moustache_club), @member.sponsor_club
end