aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index 445b20ca2a..3ea1299b1c 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -78,6 +78,13 @@ class FinderTest < ActiveRecord::TestCase
assert_equal 'The Fifth Topic of the day', records[2].title
end
+ def test_find_with_ids_and_limit
+ records = Topic.limit(2).find([4,2,5])
+ assert_equal 2, records.size
+ assert_equal 'The Fourth Topic of the day', records[0].title
+ assert_equal 'The Second Topic of the day', records[1].title
+ end
+
def test_find_passing_active_record_object_is_deprecated
assert_deprecated do
Topic.find(Topic.last)