Ticket #9640: test-sti.patch
| File test-sti.patch, 1.8 kB (added by Aleksey Kondratenko, 4 months ago) |
|---|
-
a/activerecord/test/associations/eager_test.rb
old new 1 1 require 'abstract_unit' 2 2 require 'fixtures/post' 3 require 'fixtures/tagging' 3 4 require 'fixtures/comment' 4 5 require 'fixtures/author' 5 6 require 'fixtures/category' … … 9 10 10 11 class EagerAssociationTest < ActiveSupport::TestCase 11 12 fixtures :posts, :comments, :authors, :categories, :categories_posts, 12 :companies, :accounts, :tags, : people, :readers13 :companies, :accounts, :tags, :taggings, :people, :readers 13 14 14 15 def test_loading_with_one_association 15 16 posts = Post.find(:all, :include => :comments) … … 363 364 def test_preload_with_interpolation 364 365 assert_equal [comments(:greetings)], Post.find(posts(:welcome).id, :include => :comments_with_interpolated_conditions).comments_with_interpolated_conditions 365 366 end 367 368 def test_polymorphic_type_condition 369 post = Post.find(posts(:thinking).id, :include => :taggings) 370 assert post.taggings.include?(taggings(:thinking_general)) 371 post = SpecialPost.find(posts(:thinking).id, :include => :taggings) 372 assert post.taggings.include?(taggings(:thinking_general)) 373 end 366 374 367 375 def test_eager_with_multiple_associations_with_same_table_has_many_and_habtm 368 376 # Eager includes of has many and habtm associations aren't necessarily sorted in the same way