aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-08-30 09:56:42 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-30 11:04:01 -0700
commitbd4bd3f50a7e3a8efd8f24612765a7f16e520748 (patch)
treed497864c23464c3170d52410d202430dec296d92
parent9af7828d5ad780adb702292c5153f71d3a19be47 (diff)
downloadrails-bd4bd3f50a7e3a8efd8f24612765a7f16e520748.tar.gz
rails-bd4bd3f50a7e3a8efd8f24612765a7f16e520748.tar.bz2
rails-bd4bd3f50a7e3a8efd8f24612765a7f16e520748.zip
Merge pull request #2750 from rsim/fix_test_column_names_are_escaped_for_oracle
Fix test column names are escaped for oracle
-rw-r--r--activerecord/test/cases/base_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index bee183cc67..1e647b5970 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -81,7 +81,13 @@ class BasicsTest < ActiveRecord::TestCase
}
quoted = conn.quote_column_name "foo#{badchar}bar"
- assert_equal("#{badchar}foo#{badchar * 2}bar#{badchar}", quoted)
+ if current_adapter?(:OracleAdapter)
+ # Oracle does not allow double quotes in table and column names at all
+ # therefore quoting removes them
+ assert_equal("#{badchar}foobar#{badchar}", quoted)
+ else
+ assert_equal("#{badchar}foo#{badchar * 2}bar#{badchar}", quoted)
+ end
end
def test_columns_should_obey_set_primary_key