diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 11 | ||||
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 5 |
2 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index 58786e9011..31b11ee334 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -29,11 +29,6 @@ class EagerAssociationTest < ActiveRecord::TestCase :owners, :pets, :author_favorites, :jobs, :references, :subscribers, :subscriptions, :books, :developers, :projects, :developers_projects, :members, :memberships, :clubs, :sponsors - def setup - # preheat table existence caches - Comment.find_by_id(1) - end - def test_eager_with_has_one_through_join_model_with_conditions_on_the_through member = Member.scoped(:includes => :favourite_club).find(members(:some_other_guy).id) assert_nil member.favourite_club @@ -962,10 +957,6 @@ class EagerAssociationTest < ActiveRecord::TestCase end def test_eager_loading_with_conditions_on_joined_table_preloads - # cache metadata in advance to avoid extra sql statements executed while testing - Tagging.first - Tag.first - posts = assert_queries(2) do Post.scoped(:select => 'distinct posts.*', :includes => :author, :joins => [:comments], :where => "comments.body like 'Thank you%'", :order => 'posts.id').all end @@ -987,7 +978,6 @@ class EagerAssociationTest < ActiveRecord::TestCase Post.scoped(:includes => :author, :joins => {:taggings => {:tag => :taggings}}, :where => "taggings_tags.super_tag_id=2", :order => 'posts.id').all end assert_equal posts(:welcome, :thinking), posts - end def test_eager_loading_with_conditions_on_string_joined_table_preloads @@ -1002,7 +992,6 @@ class EagerAssociationTest < ActiveRecord::TestCase end assert_equal [posts(:welcome)], posts assert_equal authors(:david), assert_no_queries { posts[0].author} - end def test_eager_loading_with_select_on_joined_table_preloads diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 6eb71cb1e0..b8481175b2 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1353,15 +1353,11 @@ class HasManyAssociationsTest < ActiveRecord::TestCase author = Author.new(:name => "David") assert !author.essays.loaded? - # cache metadata in advance to avoid extra sql statements executed while testing - Essay.first - assert_queries 1 do assert_equal 1, author.essays.size end assert_equal author.essays, Essay.where(writer_id: "David") - end def test_has_many_custom_primary_key @@ -1441,7 +1437,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase :group => "#{Namespaced::Firm.table_name}.id" ).find firm.id assert_equal 1, stats.num_clients.to_i - ensure ActiveRecord::Base.store_full_sti_class = old end |