diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-07-20 18:35:07 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-07-20 18:35:07 +0900 |
commit | d0c4e9496dd7527eb4954d1362b410129ae740ec (patch) | |
tree | e84f2c2b989e865b92773e0325011c64fe4a588c | |
parent | 526d4b8dc816c17e354e2e0243af16d10147c3f0 (diff) | |
download | rails-d0c4e9496dd7527eb4954d1362b410129ae740ec.tar.gz rails-d0c4e9496dd7527eb4954d1362b410129ae740ec.tar.bz2 rails-d0c4e9496dd7527eb4954d1362b410129ae740ec.zip |
Fix a failued AR test when using OracleAdapter
-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 316ea75e36..d57bd4cc62 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1592,7 +1592,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 @@ -1613,7 +1617,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 |