aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-10-10 17:02:47 +0200
committerMichael Koziarski <michael@koziarski.com>2008-10-10 17:04:46 +0200
commitcb45ee344d5ec6974b78dc593e4eaef2101e3d42 (patch)
treeb26c2b88e8630ce085ed8f3186e6aa37b56f82f0 /activerecord/test/cases
parent4c05055487e149bfa4152c1b42f3519671ca22ac (diff)
downloadrails-cb45ee344d5ec6974b78dc593e4eaef2101e3d42.tar.gz
rails-cb45ee344d5ec6974b78dc593e4eaef2101e3d42.tar.bz2
rails-cb45ee344d5ec6974b78dc593e4eaef2101e3d42.zip
Remove the functionality introduce in 28d3390
There are several situations it doesn't cater for, and the inconsistency isn't worth blocking 2.2.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb13
-rw-r--r--activerecord/test/cases/associations_test.rb20
2 files changed, 0 insertions, 33 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index 37b6836a89..9c718c4fef 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -47,19 +47,6 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
assert_equal apple.id, citibank.firm_id
end
- def test_foreign_key_assignment
- # Test using an existing record
- signals37 = accounts(:signals37)
- assert_equal companies(:first_firm), signals37.firm
- signals37.firm_id = companies(:another_firm).id
- assert_equal companies(:another_firm), signals37.firm
-
- # Test using a new record
- account = Account.new
- account.firm_id = companies(:another_firm).id
- assert_equal companies(:another_firm), account.firm
- end
-
def test_no_unexpected_aliasing
first_firm = companies(:first_firm)
another_firm = companies(:another_firm)
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index cde451de0e..056a29438a 100644
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -182,26 +182,6 @@ class AssociationProxyTest < ActiveRecord::TestCase
assert_nil p.author.reset
end
- def test_reset_loads_association_next_time
- welcome = posts(:welcome)
- david = authors(:david)
- author_assoc = welcome.author
-
- assert_equal david, welcome.author # So we can be sure the test works correctly
- author_assoc.reset
- assert !author_assoc.loaded?
- assert_nil author_assoc.target
- assert_equal david, welcome.author
- end
-
- def test_assigning_association_id_after_reload
- welcome = posts(:welcome)
- welcome.reload
- assert_nothing_raised do
- welcome.author_id = authors(:david).id
- end
- end
-
def test_reload_returns_assocition
david = developers(:david)
assert_nothing_raised do