mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ignore AR tests of index comment when using Oracle
This commit is contained in:
parent
c866cf9df8
commit
56e2c9e1f0
1 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue