Permalink
Browse files

Add a failing test

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent affb615 commit 943fde0a55594bb9e75783974e37eba9584ac79b @jamis jamis committed Aug 24, 2005
Showing with 9 additions and 0 deletions.
  1. +9 −0 activerecord/test/associations_test.rb
@@ -811,6 +811,15 @@ def test_store_association_in_two_relations_with_one_save
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

0 comments on commit 943fde0

Please sign in to comment.