diff options
author | Joey Butler <joey.butler.1987@gmail.com> | 2011-05-18 14:32:18 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-05-24 10:59:37 -0700 |
commit | e106dbf0394b75b41139351b74072d5650d1ef74 (patch) | |
tree | 81a37c15a8197c819057e28c1db43a748c791ccf /activerecord/test | |
parent | c4a9467af4f2e08db50b350a6ffca9bf4026ef59 (diff) | |
download | rails-e106dbf0394b75b41139351b74072d5650d1ef74.tar.gz rails-e106dbf0394b75b41139351b74072d5650d1ef74.tar.bz2 rails-e106dbf0394b75b41139351b74072d5650d1ef74.zip |
Add failing test case for issue 796
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 9 |
1 files changed, 9 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 89117593fd..29f574405e 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -766,4 +766,13 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase assert_equal [category.name], post.named_category_ids # checks when target loaded assert_equal [category.name], post.reload.named_category_ids # checks when target no loaded end + + def test_create_should_not_raise_exception_when_join_record_has_errors + repair_validations(Categorization) do + Categorization.validate { |r| r.errors[:base] << 'Invalid Categorization' } + assert_nothing_raised do + Category.create(:name => 'Fishing', :authors => [Author.first]) + end + end + end end |