aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-01-02 20:33:18 +0000
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-03 16:24:31 -0800
commit3103296a61709e808aa89c3d37cf22bcdbc5a675 (patch)
tree2f8b031165014329b4c77a785c17f06c056bf850 /activerecord/test/cases/relations_test.rb
parentd6289aadce1b8fa93e799500e52f92ce8d159d6f (diff)
downloadrails-3103296a61709e808aa89c3d37cf22bcdbc5a675.tar.gz
rails-3103296a61709e808aa89c3d37cf22bcdbc5a675.tar.bz2
rails-3103296a61709e808aa89c3d37cf22bcdbc5a675.zip
Let AssociationCollection#find use #scoped to do its finding. Note that I am removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index cd774ce343..4de180880c 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -806,4 +806,8 @@ class RelationTest < ActiveRecord::TestCase
assert_equal [rails_author], [rails_author] & relation
assert_equal [rails_author], relation & [rails_author]
end
+
+ def test_removing_limit_with_options
+ assert_not_equal 1, Post.limit(1).all(:limit => nil).count
+ end
end