mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #28673 from koic/oracle_does_not_support_index_comment
Ignore AR tests of index comment when using Oracle
This commit is contained in:
parent
5c5b12922b
commit
b5c30f336b
1 changed files with 9 additions and 5 deletions
|
@ -73,9 +73,11 @@ class CommentTest < ActiveRecord::TestCase
|
|||
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 @@ class CommentTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue