diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-12 18:16:31 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-12 18:16:31 +0100 |
commit | c37a5e7acde436b359043a67b7daace8be6f08c6 (patch) | |
tree | dc89f219e6aa0be327a35c921ed8b9f005882902 /activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | |
parent | 56064aa4b014233ae54413628679b7f7fa5d6f77 (diff) | |
download | rails-c37a5e7acde436b359043a67b7daace8be6f08c6.tar.gz rails-c37a5e7acde436b359043a67b7daace8be6f08c6.tar.bz2 rails-c37a5e7acde436b359043a67b7daace8be6f08c6.zip |
Add a commented, failing test for using a habtm in a has many through association. I want to refactor how aliasing works first.
Diffstat (limited to 'activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index 7e070e1746..e67cbcc1a8 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -713,13 +713,13 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase def test_find_grouped all_posts_from_category1 = Post.find(:all, :conditions => "category_id = 1", :joins => :categories) grouped_posts_of_category1 = Post.find(:all, :conditions => "category_id = 1", :group => "author_id", :select => 'count(posts.id) as posts_count', :joins => :categories) - assert_equal 4, all_posts_from_category1.size - assert_equal 1, grouped_posts_of_category1.size + assert_equal 5, all_posts_from_category1.size + assert_equal 2, grouped_posts_of_category1.size end def test_find_scoped_grouped - assert_equal 4, categories(:general).posts_grouped_by_title.size - assert_equal 1, categories(:technology).posts_grouped_by_title.size + assert_equal 5, categories(:general).posts_grouped_by_title.size + assert_equal 2, categories(:technology).posts_grouped_by_title.size end def test_find_scoped_grouped_having |