diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-23 13:31:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 13:31:53 +0200 |
commit | cf36d1bf2fad506ce5db49be62b2c74577f8e61b (patch) | |
tree | 92c537e55f44417993250e34b19c806b7470942b /activerecord | |
parent | 8ee9ace27b79a1e8d82e9e9482966781686d4851 (diff) | |
parent | d0c4e9496dd7527eb4954d1362b410129ae740ec (diff) | |
download | rails-cf36d1bf2fad506ce5db49be62b2c74577f8e61b.tar.gz rails-cf36d1bf2fad506ce5db49be62b2c74577f8e61b.tar.bz2 rails-cf36d1bf2fad506ce5db49be62b2c74577f8e61b.zip |
Merge pull request #29867 from koic/fix_a_failed_ar_test_when_using_oracle
Fix a failued AR test when using OracleAdapter
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 9775912f2a..a9154294ad 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1594,7 +1594,11 @@ class RelationTest < ActiveRecord::TestCase assert_equal ["comments"], scope.references_values scope = Post.order("#{Comment.quoted_table_name}.#{Comment.quoted_primary_key}") - assert_equal ["comments"], scope.references_values + if current_adapter?(:OracleAdapter) + assert_equal ["COMMENTS"], scope.references_values + else + assert_equal ["comments"], scope.references_values + end scope = Post.order("comments.body", "yaks.body") assert_equal ["comments", "yaks"], scope.references_values @@ -1615,7 +1619,11 @@ class RelationTest < ActiveRecord::TestCase assert_equal %w(comments), scope.references_values scope = Post.reorder("#{Comment.quoted_table_name}.#{Comment.quoted_primary_key}") - assert_equal ["comments"], scope.references_values + if current_adapter?(:OracleAdapter) + assert_equal ["COMMENTS"], scope.references_values + else + assert_equal ["comments"], scope.references_values + end scope = Post.reorder("comments.body", "yaks.body") assert_equal %w(comments yaks), scope.references_values |