aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/comment_test.rb
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-04-05 19:14:56 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-04-05 19:20:48 +0900
commit56e2c9e1f09d80ec56e8dd9c5418a7f1d4e37c1f (patch)
tree68c8bd653a25b8f2450c69a9b71444cc4110f0b6 /activerecord/test/cases/comment_test.rb
parentc866cf9df8b7d767f8be8272b120b44f453212cb (diff)
downloadrails-56e2c9e1f09d80ec56e8dd9c5418a7f1d4e37c1f.tar.gz
rails-56e2c9e1f09d80ec56e8dd9c5418a7f1d4e37c1f.tar.bz2
rails-56e2c9e1f09d80ec56e8dd9c5418a7f1d4e37c1f.zip
Ignore AR tests of index comment when using Oracle
Diffstat (limited to 'activerecord/test/cases/comment_test.rb')
-rw-r--r--activerecord/test/cases/comment_test.rb14
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