1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added test_forgetting_the_load_when_foreign_key_enters_late

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-01-17 00:44:55 +00:00
parent 44ac6046c1
commit d598635988

View file

@ -584,6 +584,14 @@ class BelongsToAssociationsTest < Test::Unit::TestCase
assert_equal @first_firm, c.firm_with_basic_id
end
def test_forgetting_the_load_when_foreign_key_enters_late
c = Client.new
assert_nil c.firm_with_basic_id
c.firm_id = 1
assert_equal @first_firm, c.firm_with_basic_id
end
def test_field_name_same_as_foreign_key
computer = Computer.find 1
assert_not_nil computer.developer, ":foreign key == attribute didn't lock up"