mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix test_belongs_to_with_primary_key_joins_on_correct_column test on Oracle
This commit is contained in:
parent
edf79a7fe7
commit
b0fdd290f4
1 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,10 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
|
||||||
if current_adapter?(:MysqlAdapter)
|
if current_adapter?(:MysqlAdapter)
|
||||||
assert_no_match(/`firm_with_primary_keys_companies`\.`id`/, sql)
|
assert_no_match(/`firm_with_primary_keys_companies`\.`id`/, sql)
|
||||||
assert_match(/`firm_with_primary_keys_companies`\.`name`/, sql)
|
assert_match(/`firm_with_primary_keys_companies`\.`name`/, sql)
|
||||||
|
elsif current_adapter?(:OracleAdapter)
|
||||||
|
# on Oracle aliases are truncated to 30 characters and are quoted in uppercase
|
||||||
|
assert_no_match(/"firm_with_primary_keys_compani"\."id"/i, sql)
|
||||||
|
assert_match(/"firm_with_primary_keys_compani"\."name"/i, sql)
|
||||||
else
|
else
|
||||||
assert_no_match(/"firm_with_primary_keys_companies"\."id"/, sql)
|
assert_no_match(/"firm_with_primary_keys_companies"\."id"/, sql)
|
||||||
assert_match(/"firm_with_primary_keys_companies"\."name"/, sql)
|
assert_match(/"firm_with_primary_keys_companies"\."name"/, sql)
|
||||||
|
|
Loading…
Reference in a new issue