Move test to the proper file

All preload tests are in the eager_test file
This commit is contained in:
Rafael Mendonça França 2014-05-26 23:50:49 -03:00
parent a335e10347
commit 5eae77c44b
2 changed files with 7 additions and 7 deletions

@ -1167,6 +1167,13 @@ def test_deep_including_through_habtm
)
end
test "deep preload"
post = Post.preload(author: :posts, comments: :post).first
assert_predicate post.author.association(:posts), :loaded?
assert_predicate post.comments.first.association(:post), :loaded?
end
test "preloading does not cache has many association subset when preloaded with a through association" do
author = Author.includes(:comments_with_order_and_conditions, :posts).first
assert_no_queries { assert_equal 2, author.comments_with_order_and_conditions.size }

@ -552,13 +552,6 @@ def test_find_with_preloaded_associations
end
end
def test_deep_preload
post = Post.preload(author: :posts, comments: :post).first
assert_predicate post.author.association(:posts), :loaded?
assert_predicate post.comments.first.association(:post), :loaded?
end
def test_preload_applies_to_all_chained_preloaded_scopes
assert_queries(3) do
post = Post.with_comments.with_tags.first