aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-06-07 23:03:59 -0400
committerwycats <wycats@gmail.com>2010-06-07 23:03:59 -0400
commitb97a3f33a36f936531e608343797b99268f8bd92 (patch)
tree94abb825948b826fefdfd8952c25a9f3f3690772 /activerecord/test/cases/associations
parent0042f4166f783085eb909d69d542b5323d8af5d6 (diff)
parentacef8feafa8a44271eb28685e180f8c28b7e4a0f (diff)
downloadrails-b97a3f33a36f936531e608343797b99268f8bd92.tar.gz
rails-b97a3f33a36f936531e608343797b99268f8bd92.tar.bz2
rails-b97a3f33a36f936531e608343797b99268f8bd92.zip
Merge remote branch 'rsim/oracle_enhanced_rails3'
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb4
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
2 files changed, 5 insertions, 1 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)
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 8e5bc56008..45c7498013 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -511,7 +511,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
end
def test_deleting_updates_counter_cache
- topic = Topic.first
+ topic = Topic.first(:order => "id ASC")
assert_equal topic.replies.to_a.size, topic.replies_count
topic.replies.delete(topic.replies.first)