mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add a failing test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user