From 943fde0a55594bb9e75783974e37eba9584ac79b Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 24 Aug 2005 16:25:56 +0000 Subject: Add a failing test git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'activerecord/test/associations_test.rb') diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index afb69c0b4b..e20477f3e2 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -811,6 +811,15 @@ class BelongsToAssociationsTest < Test::Unit::TestCase assert_equal num_orders +1, Order.count assert_equal num_customers +1, Customer.count end + + def test_association_assignment_sticks + client = Client.find(:first) + apple = Firm.create("name" => "Apple") + client.firm = apple + client.save! + client.reload + assert_equal apple.id, client.firm_id + end end -- cgit v1.2.3