aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/query_cache_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/query_cache_test.rb')
-rw-r--r--activerecord/test/query_cache_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/query_cache_test.rb b/activerecord/test/query_cache_test.rb
index 53dc581641..8c8ae69776 100644
--- a/activerecord/test/query_cache_test.rb
+++ b/activerecord/test/query_cache_test.rb
@@ -16,7 +16,13 @@ class QueryCacheTest < Test::Unit::TestCase
assert_queries(1) { Task.find(1); Task.find(1) }
end
end
-
+
+ def test_count_queries_with_cache
+ Task.cache do
+ assert_queries(1) { Task.count; Task.count }
+ end
+ end
+
def test_query_cache_returned
assert_not_equal ActiveRecord::QueryCache, Task.connection.class
Task.cache do