aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/inner_join_association_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-13 13:49:39 -0800
committerVijay Dev <vijaydev.cse@gmail.com>2010-12-16 01:49:29 +0530
commit08ccca764498909faa2e4f9c69cee911e6395602 (patch)
tree2b7fc39e9e27395e7007d4097f116bc5bce9eaec /activerecord/test/cases/associations/inner_join_association_test.rb
parentf0f978a4f31930777d402965cad55086ebaa46ba (diff)
downloadrails-08ccca764498909faa2e4f9c69cee911e6395602.tar.gz
rails-08ccca764498909faa2e4f9c69cee911e6395602.tar.bz2
rails-08ccca764498909faa2e4f9c69cee911e6395602.zip
fixing whitespace errors
Diffstat (limited to 'activerecord/test/cases/associations/inner_join_association_test.rb')
-rw-r--r--activerecord/test/cases/associations/inner_join_association_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb
index 780eabc443..da2a81e98a 100644
--- a/activerecord/test/cases/associations/inner_join_association_test.rb
+++ b/activerecord/test/cases/associations/inner_join_association_test.rb
@@ -65,21 +65,21 @@ class InnerJoinAssociationTest < ActiveRecord::TestCase
authors_with_welcoming_post_titles = Author.calculate(:count, 'authors.id', :joins => :posts, :distinct => true, :conditions => "posts.title like 'Welcome%'")
assert_equal real_count, authors_with_welcoming_post_titles, "inner join and conditions should have only returned authors posting titles starting with 'Welcome'"
end
-
+
def test_find_with_sti_join
scope = Post.joins(:special_comments).where(:id => posts(:sti_comments).id)
-
+
# The join should match SpecialComment and its subclasses only
assert scope.where("comments.type" => "Comment").empty?
assert !scope.where("comments.type" => "SpecialComment").empty?
assert !scope.where("comments.type" => "SubSpecialComment").empty?
end
-
+
def test_find_with_conditions_on_reflection
assert !posts(:welcome).comments.empty?
assert Post.joins(:nonexistant_comments).where(:id => posts(:welcome).id).empty? # [sic!]
end
-
+
def test_find_with_conditions_on_through_reflection
assert !posts(:welcome).tags.empty?
assert Post.joins(:misc_tags).where(:id => posts(:welcome).id).empty?