diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/finder_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index ca78fbe651..fbe4ef56f3 100755 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -14,9 +14,14 @@ class FinderTest < Test::Unit::TestCase assert_equal(@topic_fixtures["first"]["title"], Topic.find(1).title) end + def test_find_by_array_of_one_id + assert_kind_of(Array, Topic.find([ 1 ])) + assert_equal(1, Topic.find([ 1 ]).length) + end + def test_find_by_ids assert_equal(2, Topic.find(1, 2).length) - assert_equal(@topic_fixtures["second"]["title"], Topic.find([ 2 ]).title) + assert_equal(@topic_fixtures["second"]["title"], Topic.find([ 2 ]).first.title) end def test_find_by_ids_missing_one |