mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
fix test_belongs_to_with_primary_key_joins_on_correct_column test on Oracle
This commit is contained in:
@@ -37,6 +37,10 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
|
||||
if current_adapter?(:MysqlAdapter)
|
||||
assert_no_match(/`firm_with_primary_keys_companies`\.`id`/, 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
|
||||
assert_no_match(/"firm_with_primary_keys_companies"\."id"/, sql)
|
||||
assert_match(/"firm_with_primary_keys_companies"\."name"/, sql)
|
||||
|
||||
Reference in New Issue
Block a user