diff options
author | mattbauer <bauer@mmmultiworks.com> | 2009-06-21 17:35:04 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-06-21 17:35:04 +0100 |
commit | 83c1934003740ed01c618a8943457a0df53e2adb (patch) | |
tree | 7822f0bbe20603cc9563e4e59a6a4ba0f5cd71db /activerecord/test/cases | |
parent | 9cb8c812f2a23ab5653a7888740a014a02c97c18 (diff) | |
download | rails-83c1934003740ed01c618a8943457a0df53e2adb.tar.gz rails-83c1934003740ed01c618a8943457a0df53e2adb.tar.bz2 rails-83c1934003740ed01c618a8943457a0df53e2adb.zip |
Ensure hm:t#create respects source associations hash conditions [#2090 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 6 |
1 files changed, 6 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 4254badef2..7a4712d7c8 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -157,6 +157,12 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase assert_equal peeps + 1, posts(:thinking).people.count end + def test_associate_with_create_with_through_having_conditions + impatient_people = posts(:thinking).impatient_people.count + posts(:thinking).impatient_people.create!(:first_name => 'foo') + assert_equal impatient_people + 1, posts(:thinking).impatient_people.count + end + def test_associate_with_create_exclamation_and_no_options peeps = posts(:thinking).people.count posts(:thinking).people.create!(:first_name => 'foo') |