aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 17:50:20 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 17:50:20 -0200
commit17e0878005c4fd51b0bbe91dbc4f5f25b3d98e49 (patch)
tree855089819c4b23763cc71649359d8f3d4cd8ef91 /activerecord/test/cases/associations_test.rb
parent37bef5827f94137f4542cacc669e9c3ce6c9495d (diff)
downloadrails-17e0878005c4fd51b0bbe91dbc4f5f25b3d98e49.tar.gz
rails-17e0878005c4fd51b0bbe91dbc4f5f25b3d98e49.tar.bz2
rails-17e0878005c4fd51b0bbe91dbc4f5f25b3d98e49.zip
Do not test, document or use a private API method
These methods are nodoc so we should not document them.
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rw-r--r--activerecord/test/cases/associations_test.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index 1b3bacca64..3d202a5527 100644
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -43,28 +43,6 @@ class AssociationsTest < ActiveRecord::TestCase
assert_equal favs, fav2
end
- def test_clear_association_cache_stored
- firm = Firm.find(1)
- assert_kind_of Firm, firm
-
- firm.send(:clear_association_cache)
- assert_equal Firm.find(1).clients.collect(&:name).sort, firm.clients.collect(&:name).sort
- end
-
- def test_clear_association_cache_new_record
- firm = Firm.new
- client_stored = Client.find(3)
- client_new = Client.new
- client_new.name = "The Joneses"
- clients = [ client_stored, client_new ]
-
- firm.clients << clients
- assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
-
- firm.send(:clear_association_cache)
- assert_equal clients.map(&:name).to_set, firm.clients.map(&:name).to_set
- end
-
def test_loading_the_association_target_should_keep_child_records_marked_for_destruction
ship = Ship.create!(:name => "The good ship Dollypop")
part = ship.parts.create!(:name => "Mast")