diff options
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index e1a05e481b..cd9fa7cb18 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -5,9 +5,6 @@ require 'fixtures/company' require 'fixtures/topic' require 'fixtures/reply' require 'fixtures/computer' -require 'fixtures/post' -require 'fixtures/comment' -require 'fixtures/author' # Can't declare new classes in test case methods, so tests before that bad_collection_keys = false @@ -206,7 +203,7 @@ end class HasManyAssociationsTest < Test::Unit::TestCase - fixtures :accounts, :companies, :developers, :projects, :developers_projects, :topics, :posts, :comments + fixtures :accounts, :companies, :developers, :projects, :developers_projects, :topics def setup @signals37 = Firm.find(1) @@ -534,28 +531,6 @@ class HasManyAssociationsTest < Test::Unit::TestCase def test_adding_array_and_collection assert_nothing_raised { Firm.find_first.clients + Firm.find_all.last.clients } end - - def test_eager_association_loading_with_one_association - posts = Post.find(:all, :include => :comments) - assert_equal 2, posts.first.comments.size - assert_equal @greetings.body, posts.first.comments.first.body - - post = Post.find(:first, :include => :comments, :conditions => "posts.title = 'Welcome to the weblog'") - assert_equal 2, post.comments.size - assert_equal @greetings.body, post.comments.first.body - end - - def test_eager_association_loading_with_multiple_associations - posts = Post.find(:all, :include => [ :comments, :author ]) - assert_equal 2, posts.first.comments.size - assert_equal @greetings.body, posts.first.comments.first.body - end - - def xtest_eager_association_loading_with_belongs_to - comments = Comment.find(:all, :include => :post) - assert_equal @welcome.title, comments.first.post.title - assert_equal @thinking.title, comments.last.post.title - end end class BelongsToAssociationsTest < Test::Unit::TestCase |