diff options
Diffstat (limited to 'activerecord/test/cases/associations/eager_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 811ebfbe3f..d5a4d9007b 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -301,13 +301,13 @@ class EagerAssociationTest < ActiveRecord::TestCase subscriber =Subscriber.find(subscribers(:second).id, :include => :subscriptions) assert_equal subscriptions, subscriber.subscriptions.sort_by(&:id) end - + def test_eager_load_has_many_through_with_string_keys books = books(:awdr, :rfr) subscriber = Subscriber.find(subscribers(:second).id, :include => :books) assert_equal books, subscriber.books.sort_by(&:id) end - + def test_eager_load_belongs_to_with_string_keys subscriber = subscribers(:second) subscription = Subscription.find(subscriptions(:webster_awdr).id, :include => :subscriber) @@ -434,7 +434,7 @@ class EagerAssociationTest < ActiveRecord::TestCase author_posts_without_comments = author.posts.select { |post| post.comments.blank? } assert_equal author_posts_without_comments.size, author.posts.count(:all, :include => :comments, :conditions => 'comments.id is null') end - + def test_eager_count_performed_on_a_has_many_through_association_with_multi_table_conditional person = people(:michael) person_posts_without_comments = person.posts.select { |post| post.comments.blank? } @@ -823,7 +823,7 @@ class EagerAssociationTest < ActiveRecord::TestCase assert_equal expected, firm.clients_using_primary_key end end - + def test_preload_has_one_using_primary_key expected = Firm.find(:first).account_using_primary_key firm = Firm.find :first, :include => :account_using_primary_key @@ -839,5 +839,5 @@ class EagerAssociationTest < ActiveRecord::TestCase assert_equal expected, firm.account_using_primary_key end end - + end |