Skip to content
Browse files

Merge branch 'master' of github.com:rails/rails

  • Loading branch information...
2 parents 62113a8 + 6df88f0 commit 8a9a7562ccf5a67f39ee75d1de798e60e8854f2b @fxn fxn committed Dec 15, 2010
Showing with 9 additions and 1 deletion.
  1. +9 −1 activerecord/test/cases/associations/eager_test.rb
View
10 activerecord/test/cases/associations/eager_test.rb
@@ -17,18 +17,26 @@
require 'models/book'
require 'models/developer'
require 'models/project'
+require 'models/member'
+require 'models/membership'
+require 'models/club'
class EagerAssociationTest < ActiveRecord::TestCase
fixtures :posts, :comments, :authors, :author_addresses, :categories, :categories_posts,
:companies, :accounts, :tags, :taggings, :people, :readers,
:owners, :pets, :author_favorites, :jobs, :references, :subscribers, :subscriptions, :books,
- :developers, :projects, :developers_projects
+ :developers, :projects, :developers_projects, :members, :memberships, :clubs
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.find(members(:some_other_guy).id, :include => :favourite_club)
+ assert_nil member.favourite_club
+ end
+
def test_loading_with_one_association
posts = Post.find(:all, :include => :comments)
post = posts.find { |p| p.id == 1 }

0 comments on commit 8a9a756

Please sign in to comment.
Something went wrong with that request. Please try again.