From 97403ad5fdfcdfb2110c6f8fd0ebf43b7afc4859 Mon Sep 17 00:00:00 2001 From: miloops Date: Fri, 21 Nov 2008 19:20:33 -0300 Subject: Add :having option to find, to use in combination with grouped finds. Also added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski [#1028 state:committed] --- activerecord/test/cases/associations/has_many_associations_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 59784e1bcb..816ceb6855 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -255,6 +255,11 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert_equal 2, companies(:first_firm).clients_grouped_by_name.length end + def test_find_scoped_grouped_having + assert_equal 1, authors(:david).popular_grouped_posts.length + assert_equal 0, authors(:mary).popular_grouped_posts.length + end + def test_adding force_signal37_to_load_all_clients_of_firm natural = Client.new("name" => "Natural Company") -- cgit v1.2.3