aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-02-03 01:09:58 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-02-03 01:09:58 +0000
commit78253acb599102528498d2257a37361a39f850f7 (patch)
tree594f87416a188763ab7eb29fc1df7efeb71d6cce /activerecord/test/cases/associations
parent7fe2ad72790eeffcca382907ff63346981eb0f41 (diff)
downloadrails-78253acb599102528498d2257a37361a39f850f7.tar.gz
rails-78253acb599102528498d2257a37361a39f850f7.tar.bz2
rails-78253acb599102528498d2257a37361a39f850f7.zip
Revert r8742: remove has_many with :group option since it has sketchy sql support. Closes #10480.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index 8da13d8b1b..f59fe70654 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -603,21 +603,6 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
end
end
- def test_group_has_many_through_should_use_group_for_count
- using_length = authors(:david).reload.grouped_comments.length # all associated comments are read first
- using_count = authors(:david).reload.grouped_comments.count # associated comments are only counted
- assert_equal using_count, using_length
-
- commented_posts = authors(:david).comments.map(&:post).uniq.size # count commented posts manually
- assert_equal commented_posts, authors(:david).grouped_comments.count
- end
-
- def test_group_has_many_through_should_not_allow_column_name_for_count
- assert_raises ActiveRecord::HasManyThroughCantCountOnColumnForGroupedAssociation do
- authors(:david).grouped_comments.count(:id)
- end
- end
-
private
# create dynamic Post models to allow different dependency options
def find_post_with_dependency(post_id, association, association_name, dependency)