aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/pk_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/pk_test.rb')
-rw-r--r--activerecord/test/pk_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/pk_test.rb b/activerecord/test/pk_test.rb
index 6c70988a26..fb07194743 100644
--- a/activerecord/test/pk_test.rb
+++ b/activerecord/test/pk_test.rb
@@ -44,12 +44,15 @@ class PrimaryKeysTest < Test::Unit::TestCase
def test_primary_key_prefix
ActiveRecord::Base.primary_key_prefix_type = :table_name
+ Topic.reset_primary_key
assert_equal "topicid", Topic.primary_key
ActiveRecord::Base.primary_key_prefix_type = :table_name_with_underscore
+ Topic.reset_primary_key
assert_equal "topic_id", Topic.primary_key
ActiveRecord::Base.primary_key_prefix_type = nil
+ Topic.reset_primary_key
assert_equal "id", Topic.primary_key
end
end