aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorgregolsen <anotheroneman@yahoo.com>2012-01-31 18:16:48 +0200
committergregolsen <anotheroneman@yahoo.com>2012-01-31 18:16:48 +0200
commitb00a5e6e513d548d07d339738125ef10e4854837 (patch)
tree4f35beac9411512cc877b779fdf24a72eb8bb2fb /activerecord/test
parent58cd0085a93fb8f65bffbbe0aceebae6342e59c2 (diff)
downloadrails-b00a5e6e513d548d07d339738125ef10e4854837.tar.gz
rails-b00a5e6e513d548d07d339738125ef10e4854837.tar.bz2
rails-b00a5e6e513d548d07d339738125ef10e4854837.zip
test_get_ids_for_ordered_association fixed
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
-rw-r--r--activerecord/test/models/company.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 367f87031c..6ca1b2f0c4 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -1279,7 +1279,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
end
def test_get_ids_for_ordered_association
- assert_equal [companies(:second_client).id, companies(:first_client).id], companies(:first_firm).clients_ordered_by_rating_ids
+ assert_equal [companies(:second_client).id, companies(:first_client).id], companies(:first_firm).clients_ordered_by_name_ids
end
def test_assign_ids_ignoring_blanks
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index 764f1c1df5..fbdfaa2c29 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -45,7 +45,7 @@ class Firm < Company
has_many :unsorted_clients_with_symbol, :class_name => :Client
has_many :clients_sorted_desc, :class_name => "Client", :order => "id DESC"
has_many :clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id"
- has_many :clients_ordered_by_rating, :order => "rating", :class_name => "Client"
+ has_many :clients_ordered_by_name, :order => "name", :class_name => "Client"
has_many :unvalidated_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :validate => false
has_many :dependent_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => :destroy
has_many :exclusively_dependent_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => :delete_all