diff options
Diffstat (limited to 'activerecord/test/cases/collection_cache_key_test.rb')
-rw-r--r-- | activerecord/test/cases/collection_cache_key_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/collection_cache_key_test.rb b/activerecord/test/cases/collection_cache_key_test.rb index 93e7b9cff6..6b34979e4a 100644 --- a/activerecord/test/cases/collection_cache_key_test.rb +++ b/activerecord/test/cases/collection_cache_key_test.rb @@ -74,5 +74,10 @@ module ActiveRecord assert_match(/\Acomments\/query-(\h+)-0\Z/, empty_loaded_collection.cache_key) end + + test "cache_key for queries with offset which return 0 rows" do + developers = Developer.offset(20) + assert_match(/\Adevelopers\/query-(\h+)-0\Z/, developers.cache_key) + end end end |