diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:32 +0200 |
commit | b95d6e84b00bd926b1118f6a820eca7a870b8c35 (patch) | |
tree | 0753080f3b0dabbe0b2f62abe044c24d6b4ed5c4 /activerecord/test/cases/associations/join_model_test.rb | |
parent | 36a84a4f15f29b41c7cac2f8de410055006a8a8d (diff) | |
download | rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.gz rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.tar.bz2 rails-b95d6e84b00bd926b1118f6a820eca7a870b8c35.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activerecord/test/cases/associations/join_model_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/join_model_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 447fe4d275..fcdb81e92e 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -43,11 +43,11 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert_queries(1) { assert_equal 0, author.unique_categorized_posts.count(:title, :conditions => "title is NULL") } assert !authors(:mary).unique_categorized_posts.loaded? end - + def test_has_many_uniq_through_find assert_equal 1, authors(:mary).unique_categorized_posts.find(:all).size end - + def test_has_many_uniq_through_dynamic_find assert_equal 1, authors(:mary).unique_categorized_posts.find_all_by_title("So I was thinking").size end @@ -297,7 +297,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert_equal [], posts(:thinking).authors assert_equal [authors(:mary)], posts(:authorless).authors end - + def test_both_scoped_and_explicit_joins_should_be_respected assert_nothing_raised do Post.send(:with_scope, :find => {:joins => "left outer join comments on comments.id = posts.id"}) do @@ -575,7 +575,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase def test_calculations_on_has_many_through_should_disambiguate_fields assert_nothing_raised { authors(:david).categories.maximum(:id) } end - + def test_calculations_on_has_many_through_should_not_disambiguate_fields_unless_necessary assert_nothing_raised { authors(:david).categories.maximum("categories.id") } end @@ -675,7 +675,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase end assert ! david.categories.loaded? end - + def test_has_many_through_include_returns_false_for_non_matching_record_to_verify_scoping david = authors(:david) category = Category.create!(:name => 'Not Associated') |