diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-04-05 15:07:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 15:07:30 +0100 |
commit | 70514d3bd12259c3f4cabc7589865a3b5a54ed28 (patch) | |
tree | 782be2ef947998542e4604d6b97c607da4e2527b /activerecord/test | |
parent | ed617a324adb075db7b3a6785e56200d8a0c90a3 (diff) | |
parent | 56e2c9e1f09d80ec56e8dd9c5418a7f1d4e37c1f (diff) | |
download | rails-70514d3bd12259c3f4cabc7589865a3b5a54ed28.tar.gz rails-70514d3bd12259c3f4cabc7589865a3b5a54ed28.tar.bz2 rails-70514d3bd12259c3f4cabc7589865a3b5a54ed28.zip |
Merge pull request #28673 from koic/oracle_does_not_support_index_comment
Ignore AR tests of index comment when using Oracle
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/comment_test.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/activerecord/test/cases/comment_test.rb b/activerecord/test/cases/comment_test.rb index 63f67a9a16..c23be52a6c 100644 --- a/activerecord/test/cases/comment_test.rb +++ b/activerecord/test/cases/comment_test.rb @@ -72,9 +72,11 @@ if ActiveRecord::Base.connection.supports_comments? end def test_add_index_with_comment_later - @connection.add_index :commenteds, :obvious, name: "idx_obvious", comment: "We need to see obvious comments" - index = @connection.indexes("commenteds").find { |idef| idef.name == "idx_obvious" } - assert_equal "We need to see obvious comments", index.comment + unless current_adapter?(:OracleAdapter) + @connection.add_index :commenteds, :obvious, name: "idx_obvious", comment: "We need to see obvious comments" + index = @connection.indexes("commenteds").find { |idef| idef.name == "idx_obvious" } + assert_equal "We need to see obvious comments", index.comment + end end def test_add_comment_to_column @@ -112,8 +114,10 @@ if ActiveRecord::Base.connection.supports_comments? assert_match %r[t\.string\s+"obvious"\n], output assert_match %r[t\.string\s+"content",\s+comment: "Whoa, content describes itself!"], output assert_match %r[t\.integer\s+"rating",\s+comment: "I am running out of imagination"], output - assert_match %r[t\.index\s+.+\s+comment: "\\\"Very important\\\" index that powers all the performance.\\nAnd it's fun!"], output - assert_match %r[t\.index\s+.+\s+name: "idx_obvious",\s+comment: "We need to see obvious comments"], output + unless current_adapter?(:OracleAdapter) + assert_match %r[t\.index\s+.+\s+comment: "\\\"Very important\\\" index that powers all the performance.\\nAnd it's fun!"], output + assert_match %r[t\.index\s+.+\s+name: "idx_obvious",\s+comment: "We need to see obvious comments"], output + end end def test_schema_dump_omits_blank_comments |