aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/belongs_to_associations_test.rb
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2010-05-16 23:40:22 +0300
committerRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2010-06-04 22:44:04 +0300
commitb0fdd290f4b186e6da9c550336ee610970f2e8a3 (patch)
treeb63ed4f9bbe7feb3d1b566848737f80ac8d7ad85 /activerecord/test/cases/associations/belongs_to_associations_test.rb
parentedf79a7fe7c78e291c06a6d8be3ae87dabde9afa (diff)
downloadrails-b0fdd290f4b186e6da9c550336ee610970f2e8a3.tar.gz
rails-b0fdd290f4b186e6da9c550336ee610970f2e8a3.tar.bz2
rails-b0fdd290f4b186e6da9c550336ee610970f2e8a3.zip
fix test_belongs_to_with_primary_key_joins_on_correct_column test on Oracle
Diffstat (limited to 'activerecord/test/cases/associations/belongs_to_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index 9258c987ef..fb1e6e7e70 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -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)