Permalink
Browse files

Merge pull request #2750 from rsim/fix_test_column_names_are_escaped_…

…for_oracle

Fix test column names are escaped for oracle
  • Loading branch information...
1 parent 9af7828 commit bd4bd3f50a7e3a8efd8f24612765a7f16e520748 @jonleighton jonleighton committed with tenderlove Aug 30, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 activerecord/test/cases/base_test.rb
@@ -81,7 +81,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 bd4bd3f

Please sign in to comment.