aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/finder_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r--activerecord/test/finder_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index 98537ecad7..f23e383115 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -13,6 +13,12 @@ class FinderTest < Test::Unit::TestCase
assert_equal(topics(:first).title, Topic.find(1).title)
end
+ # find should handle strings that come from URLs
+ # (example: Category.find(params[:id]))
+ def test_find_with_string
+ assert_equal(Topic.find(1).title,Topic.find("1").title)
+ end
+
def test_exists
assert (Topic.exists?(1))
assert !(Topic.exists?(45))