aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/integration_test.rb
diff options
context:
space:
mode:
authorrono23 <rono23@gmail.com>2013-12-19 01:35:30 +0900
committerrono23 <rono23@gmail.com>2013-12-19 05:29:16 +0900
commitee738f960439e511285bc53b7207cebacda8db36 (patch)
treedc0ebecdfcb6258e0c4e2896f5407d1610018af3 /activerecord/test/cases/integration_test.rb
parent7b5cf7ef9dce90dc5352a0f220e65722fe44a962 (diff)
downloadrails-ee738f960439e511285bc53b7207cebacda8db36.tar.gz
rails-ee738f960439e511285bc53b7207cebacda8db36.tar.bz2
rails-ee738f960439e511285bc53b7207cebacda8db36.zip
Fix to_param when attribute has multibyte character
Diffstat (limited to 'activerecord/test/cases/integration_test.rb')
-rw-r--r--activerecord/test/cases/integration_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/integration_test.rb b/activerecord/test/cases/integration_test.rb
index 07ffcef875..95b028e59e 100644
--- a/activerecord/test/cases/integration_test.rb
+++ b/activerecord/test/cases/integration_test.rb
@@ -46,6 +46,12 @@ class IntegrationTest < ActiveRecord::TestCase
assert_equal '4-ab-ab-ab-ab-ab-ab', firm.to_param
end
+ def test_to_param_class_method_multibyte_character
+ firm = Firm.find(4)
+ firm.name = "戦場ヶ原 ひたぎ"
+ assert_equal '4', firm.to_param
+ end
+
def test_to_param_class_method_uses_default_if_blank
firm = Firm.find(4)
firm.name = nil