diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-10-04 21:57:44 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@garaio.com> | 2012-10-05 08:54:38 +0200 |
commit | 16e4a53b78aacc78712ff6ad4aa2da3a69faff5c (patch) | |
tree | e2d4046a87fb41ba505a1722ed0df7786eb75ca0 /activerecord/test/cases/adapters | |
parent | a8c8a08f1ae7099f750058ef3e168810e5ad47d8 (diff) | |
download | rails-16e4a53b78aacc78712ff6ad4aa2da3a69faff5c.tar.gz rails-16e4a53b78aacc78712ff6ad4aa2da3a69faff5c.tar.bz2 rails-16e4a53b78aacc78712ff6ad4aa2da3a69faff5c.zip |
PostgreSQL, quote table names when fetching the primary key. Closes #5920
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb index 92e31a3e44..f1362dd15f 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -14,6 +14,10 @@ module ActiveRecord assert_equal 'id', @connection.primary_key('ex') end + def test_primary_key_works_tables_containing_capital_letters + assert_equal 'id', @connection.primary_key('CamelCase') + end + def test_non_standard_primary_key @connection.exec_query('drop table if exists ex') @connection.exec_query('create table ex(data character varying(255) primary key)') |