diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-22 10:11:27 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-23 15:19:18 -0800 |
commit | 4e13625818579551c01640cb405a8c22a3bd0e68 (patch) | |
tree | 1c24f1e374712dcda2e016d1a8ef5265c22802c5 /activerecord | |
parent | ff7bde62c857ec94f45a5be3bc76468deb8b0b3a (diff) | |
download | rails-4e13625818579551c01640cb405a8c22a3bd0e68.tar.gz rails-4e13625818579551c01640cb405a8c22a3bd0e68.tar.bz2 rails-4e13625818579551c01640cb405a8c22a3bd0e68.zip |
Test demonstrating problem with foo.association_ids where it's a has_many :through with :conditions, with a belongs_to as the source reflection
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index dfb3292502..ad67886202 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -529,4 +529,8 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase author = authors(:david) assert_equal ['body'], author.comments.select('comments.body').first.attributes.keys end + + def test_get_has_many_through_belongs_to_ids_with_conditions + assert_equal [categories(:general).id], authors(:mary).categories_like_general_ids + end end |