aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-02-27 04:00:24 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-02-27 06:27:49 +0900
commit64e494f7486f0ea6c34707dfe5dd6f19627798af (patch)
treed60016734c06a410f41733ccb77c14339e576e03 /activerecord/test
parent7888f4fae0b0d0b63fde1645feb61c588bb4c010 (diff)
downloadrails-64e494f7486f0ea6c34707dfe5dd6f19627798af.tar.gz
rails-64e494f7486f0ea6c34707dfe5dd6f19627798af.tar.bz2
rails-64e494f7486f0ea6c34707dfe5dd6f19627798af.zip
Use `max_identifier_length` for `index_name_length` in PostgreSQL adapter
Actually `index_name_length` depend on `max_identifier_length`, not always 63.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/connection_test.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb
index 98d392f25a..c52d9e37cc 100644
--- a/activerecord/test/cases/adapters/postgresql/connection_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb
@@ -105,7 +105,7 @@ module ActiveRecord
end
def test_table_alias_length_logs_name
- @connection.instance_variable_set("@table_alias_length", nil)
+ @connection.instance_variable_set("@max_identifier_length", nil)
@connection.table_alias_length
assert_equal "SCHEMA", @subscriber.logged[0][1]
end
@@ -177,7 +177,6 @@ module ActiveRecord
assert_not_equal original_connection_pid, new_connection_pid,
"umm -- looks like you didn't break the connection, because we're still " \
"successfully querying with the same connection pid."
-
ensure
# Repair all fixture connections so other tests won't break.
@fixture_connections.each(&:verify!)