aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-09-07 10:24:25 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-09-07 10:44:50 -0700
commitf5ea24b3db952071eea73cdef7fd52e38e7e540f (patch)
tree11a31866fb887b05e01c005b950caa335be410c0 /activerecord/test
parent9dd5c0391986cae96d9399f3f51f0fccb95bee71 (diff)
downloadrails-f5ea24b3db952071eea73cdef7fd52e38e7e540f.tar.gz
rails-f5ea24b3db952071eea73cdef7fd52e38e7e540f.tar.bz2
rails-f5ea24b3db952071eea73cdef7fd52e38e7e540f.zip
Merge commit 'refs/pull/2909/head' of https://github.com/rails/rails into rawr
* https://github.com/rails/rails: Postgresql adapter: added current_schema check for table_exists? Postgresql adapter: added current_schema check for table_exists?
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/schema_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/schema_test.rb b/activerecord/test/cases/adapters/postgresql/schema_test.rb
index 4c6d865d59..76c73e9dfa 100644
--- a/activerecord/test/cases/adapters/postgresql/schema_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/schema_test.rb
@@ -91,6 +91,12 @@ class SchemaTest < ActiveRecord::TestCase
end
end
+ def test_table_exists_quoted_table
+ with_schema_search_path(SCHEMA_NAME) do
+ assert(@connection.table_exists?('"things.table"'), "table should exist")
+ end
+ end
+
def test_with_schema_prefixed_table_name
assert_nothing_raised do
assert_equal COLUMNS, columns("#{SCHEMA_NAME}.#{TABLE_NAME}")