提交 e106dbf0 编写于 作者: J Joey Butler 提交者: Aaron Patterson

Add failing test case for issue 796

上级 c4a9467a
......@@ -766,4 +766,13 @@ def test_primary_key_option_on_source
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册