Permalink
Browse files

Oracle adapter removes double quotes when quoting table and column names

  • Loading branch information...
1 parent cb25537 commit db41b634f090a64b20208a804cc8812a878c541d @rsim rsim committed Aug 30, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 activerecord/test/cases/base_test.rb
@@ -70,7 +70,13 @@ def test_column_names_are_escaped
}
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

0 comments on commit db41b63

Please sign in to comment.