aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/integration_test.rb
diff options
context:
space:
mode:
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 8097f6e36e..07ffcef875 100644
--- a/activerecord/test/cases/integration_test.rb
+++ b/activerecord/test/cases/integration_test.rb
@@ -34,6 +34,12 @@ class IntegrationTest < ActiveRecord::TestCase
assert_equal '4-a-a-a-a-a-a-a-a-a', firm.to_param
end
+ def test_to_param_class_method_truncates_edge_case
+ firm = Firm.find(4)
+ firm.name = 'David HeinemeierHansson'
+ assert_equal '4-david', firm.to_param
+ end
+
def test_to_param_class_method_squishes
firm = Firm.find(4)
firm.name = "ab \n" * 100