Skip to content

Commit bd4bd3f

Browse files
jonleightontenderlove
authored andcommitted
Merge pull request rails#2750 from rsim/fix_test_column_names_are_escaped_for_oracle
Fix test column names are escaped for oracle
1 parent 9af7828 commit bd4bd3f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

activerecord/test/cases/base_test.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ def test_column_names_are_escaped
8181
}
8282

8383
quoted = conn.quote_column_name "foo#{badchar}bar"
84-
assert_equal("#{badchar}foo#{badchar * 2}bar#{badchar}", quoted)
84+
if current_adapter?(:OracleAdapter)
85+
# Oracle does not allow double quotes in table and column names at all
86+
# therefore quoting removes them
87+
assert_equal("#{badchar}foobar#{badchar}", quoted)
88+
else
89+
assert_equal("#{badchar}foo#{badchar * 2}bar#{badchar}", quoted)
90+
end
8591
end
8692

8793
def test_columns_should_obey_set_primary_key

0 commit comments

Comments
 (0)