aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-02-09 09:17:40 +0000
committerMichael Koziarski <michael@koziarski.com>2006-02-09 09:17:40 +0000
commitd49a5fcb4cfe90824337dc3756bae7161cea768b (patch)
tree48af0b2f4c9301be8e0816e5ac759516862db2ef /activerecord/test/base_test.rb
parent803b9a41af46210da842afdba032c34109514942 (diff)
downloadrails-d49a5fcb4cfe90824337dc3756bae7161cea768b.tar.gz
rails-d49a5fcb4cfe90824337dc3756bae7161cea768b.tar.bz2
rails-d49a5fcb4cfe90824337dc3756bae7161cea768b.zip
* Fix pagination problems when using include
* Introduce Unit Tests for pagination * Allow count to work with :include by using count distinct. [Kevin Clark & Jeremy Hopple] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-xactiverecord/test/base_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index d2f347e0cb..475e31028a 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1056,6 +1056,13 @@ class BasicsTest < Test::Unit::TestCase
"LEFT JOIN comments ON posts.id=comments.post_id")
end
assert_equal res, res2
+
+ res3 = res + 1
+ assert_nothing_raised do
+ res3 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'",
+ :joins => "LEFT JOIN comments ON posts.id=comments.post_id")
+ end
+ assert_equal res, res3
end
def test_clear_association_cache_stored