Improve the tests to not call assert_nothing_raised

上级 b94e2dd8
......@@ -176,10 +176,7 @@ def test_eager_association_loading_with_recursive_cascading_four_levels_has_and_
end
def test_eager_association_loading_with_cascaded_interdependent_one_level_and_two_levels
authors_relation = Author.all.merge!(:includes => [:comments, {:posts => :categorizations}], :order => "authors.id")
assert_nothing_raised do
authors_relation.to_a
end
authors_relation = Author.all.merge!(includes: [:comments, { posts: :categorizations }], order: "authors.id")
authors = authors_relation.to_a
assert_equal 3, authors.size
assert_equal 10, authors[0].comments.size
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册