Permalink
Browse files

Add failing test case for issue 796

  • Loading branch information...
JoeyButler authored and tenderlove committed May 18, 2011
1 parent f236dbf commit d387a598bf3555d3576a98ff6d072256380b584d
Showing with 9 additions and 0 deletions.
  1. +9 −0 activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -495,4 +495,13 @@ def test_deprecated_interpolated_conditions
assert_equal post.tags, post.deprecated_interpolated_tags_2
end
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

0 comments on commit d387a59

Please sign in to comment.