mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Improve the tests to not call assert_nothing_raised
This commit is contained in:
parent
b94e2dd82c
commit
da0463cf5e
1 changed files with 1 additions and 4 deletions
|
@ -176,10 +176,7 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue