diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-13 13:49:39 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:29 +0530 |
commit | 08ccca764498909faa2e4f9c69cee911e6395602 (patch) | |
tree | 2b7fc39e9e27395e7007d4097f116bc5bce9eaec /activerecord/test | |
parent | f0f978a4f31930777d402965cad55086ebaa46ba (diff) | |
download | rails-08ccca764498909faa2e4f9c69cee911e6395602.tar.gz rails-08ccca764498909faa2e4f9c69cee911e6395602.tar.bz2 rails-08ccca764498909faa2e4f9c69cee911e6395602.zip |
fixing whitespace errors
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/inner_join_association_test.rb | 8 |
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? |