Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar
2006-06-19 16:45:34 +00:00
parent ae0e1a0682
commit e5fc5aaffe
3 changed files with 8 additions and 2 deletions

View File

@@ -1316,6 +1316,10 @@ class BasicsTest < Test::Unit::TestCase
assert_equal 'ActiveRecord::Person', ActiveRecord::Base.send(:type_name_with_module, 'Person')
assert_equal '::Person', ActiveRecord::Base.send(:type_name_with_module, '::Person')
end
def test_to_param_should_return_string
assert_kind_of String, Client.find(:first).to_param
end
# FIXME: this test ought to run, but it needs to run sandboxed so that it
# doesn't b0rk the current test environment by undefing everything.