mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove useless test case
Cannot call private methods in `@klass` against `CollectionProxy` (inherites `Relation`) because using `public_send` in `method_missing`.
This commit is contained in:
parent
801b33a481
commit
111ae37401
2 changed files with 0 additions and 13 deletions
|
@ -2037,11 +2037,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
|
||||||
assert_equal client_association.new.attributes, client_association.send(:new).attributes
|
assert_equal client_association.new.attributes, client_association.send(:new).attributes
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_respond_to_private_class_methods
|
|
||||||
client_association = companies(:first_firm).clients
|
|
||||||
assert !client_association.respond_to?(:private_method)
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_creating_using_primary_key
|
def test_creating_using_primary_key
|
||||||
firm = Firm.all.merge!(order: "id").first
|
firm = Firm.all.merge!(order: "id").first
|
||||||
client = firm.clients_using_primary_key.create!(name: "test")
|
client = firm.clients_using_primary_key.create!(name: "test")
|
||||||
|
|
|
@ -170,14 +170,6 @@ class Client < Company
|
||||||
|
|
||||||
def overwrite_to_raise
|
def overwrite_to_raise
|
||||||
end
|
end
|
||||||
|
|
||||||
class << self
|
|
||||||
private
|
|
||||||
|
|
||||||
def private_method
|
|
||||||
"darkness"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class ExclusivelyDependentFirm < Company
|
class ExclusivelyDependentFirm < Company
|
||||||
|
|
Loading…
Reference in a new issue