diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-13 13:49:39 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 08:42:58 -0800 |
commit | df20c9f1a9b1eed52390cb983e241206961beda0 (patch) | |
tree | e7a9cba5eeaf69486b03d1171e9d263c7b24028b | |
parent | 34d1e5d04d2e2583bf28fc2365f43d5917e2c648 (diff) | |
download | rails-df20c9f1a9b1eed52390cb983e241206961beda0.tar.gz rails-df20c9f1a9b1eed52390cb983e241206961beda0.tar.bz2 rails-df20c9f1a9b1eed52390cb983e241206961beda0.zip |
fixing whitespace errors
-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? |