aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-12-15 20:50:17 +0100
committerXavier Noria <fxn@hashref.com>2010-12-15 20:50:17 +0100
commit8a9a7562ccf5a67f39ee75d1de798e60e8854f2b (patch)
treef30eb76daabbad341760ff0011b458cde6856e9e
parent62113a8fa9e81c3fa9b3a5aaf17cdd53f5331765 (diff)
parent6df88f0d2c5fb65f5b94b6c553b000098b9f2eee (diff)
downloadrails-8a9a7562ccf5a67f39ee75d1de798e60e8854f2b.tar.gz
rails-8a9a7562ccf5a67f39ee75d1de798e60e8854f2b.tar.bz2
rails-8a9a7562ccf5a67f39ee75d1de798e60e8854f2b.zip
Merge branch 'master' of github.com:rails/rails
-rw-r--r--activerecord/test/cases/associations/eager_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index c96ca90750..34a1cdeebe 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -17,18 +17,26 @@ require 'models/subscription'
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 }