mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix deprecation warning test
In 1b455e2e9d
we switched to Rails 7.0 instead of 6.2 for the next
release. This test was failing due to checking for 6.2 rather than 7.0
in the deprecation warning.
This commit is contained in:
parent
1b455e2e9d
commit
ab5331e089
1 changed files with 4 additions and 4 deletions
|
@ -61,7 +61,7 @@ class RelationMergingTest < ActiveRecord::TestCase
|
|||
assert_equal [mary, bob], mary_and_bob
|
||||
|
||||
author_id = Regexp.escape(Author.connection.quote_table_name("authors.id"))
|
||||
message = %r/Merging \(#{author_id} BETWEEN (\?|\W?\w?\d) AND \g<1>\) and \(#{author_id} (?:= \g<1>|IN \(\g<1>, \g<1>\))\) no longer maintain both conditions, and will be replaced by the latter in Rails 6\.2\./
|
||||
message = %r/Merging \(#{author_id} BETWEEN (\?|\W?\w?\d) AND \g<1>\) and \(#{author_id} (?:= \g<1>|IN \(\g<1>, \g<1>\))\) no longer maintain both conditions, and will be replaced by the latter in Rails 7\.0\./
|
||||
|
||||
assert_deprecated(message) do
|
||||
assert_equal [mary], david_and_mary.merge(Author.where(id: mary))
|
||||
|
@ -80,7 +80,7 @@ class RelationMergingTest < ActiveRecord::TestCase
|
|||
end
|
||||
assert_equal [david, bob], mary_and_bob.merge(Author.where(id: [david, bob]), rewhere: true)
|
||||
|
||||
message = %r/Merging \(#{author_id} BETWEEN (\?|\W?\w?\d) AND \g<1>\) and \(#{author_id} BETWEEN \g<1> AND \g<1>\) no longer maintain both conditions, and will be replaced by the latter in Rails 6\.2\./
|
||||
message = %r/Merging \(#{author_id} BETWEEN (\?|\W?\w?\d) AND \g<1>\) and \(#{author_id} BETWEEN \g<1> AND \g<1>\) no longer maintain both conditions, and will be replaced by the latter in Rails 7\.0\./
|
||||
|
||||
assert_deprecated(message) do
|
||||
assert_equal [mary], david_and_mary.merge(mary_and_bob)
|
||||
|
@ -114,7 +114,7 @@ class RelationMergingTest < ActiveRecord::TestCase
|
|||
assert_equal [mary, bob], mary_and_bob
|
||||
|
||||
author_id = Regexp.escape(Author.connection.quote_table_name("authors.id"))
|
||||
message = %r/Merging \(\(#{author_id} = (\?|\W?\w?\d) OR #{author_id} = \g<1>\)\) and \(#{author_id} (?:= \g<1>|IN \(\g<1>, \g<1>\))\) no longer maintain both conditions, and will be replaced by the latter in Rails 6\.2\./
|
||||
message = %r/Merging \(\(#{author_id} = (\?|\W?\w?\d) OR #{author_id} = \g<1>\)\) and \(#{author_id} (?:= \g<1>|IN \(\g<1>, \g<1>\))\) no longer maintain both conditions, and will be replaced by the latter in Rails 7\.0\./
|
||||
|
||||
assert_deprecated(message) do
|
||||
assert_equal [mary], david_and_mary.merge(Author.where(id: mary))
|
||||
|
@ -133,7 +133,7 @@ class RelationMergingTest < ActiveRecord::TestCase
|
|||
end
|
||||
assert_equal [david, bob], mary_and_bob.merge(Author.where(id: [david, bob]), rewhere: true)
|
||||
|
||||
message = %r/Merging \(\(#{author_id} = (\?|\W?\w?\d) OR #{author_id} = \g<1>\)\) and \(\(#{author_id} = \g<1> OR #{author_id} = \g<1>\)\) no longer maintain both conditions, and will be replaced by the latter in Rails 6\.2\./
|
||||
message = %r/Merging \(\(#{author_id} = (\?|\W?\w?\d) OR #{author_id} = \g<1>\)\) and \(\(#{author_id} = \g<1> OR #{author_id} = \g<1>\)\) no longer maintain both conditions, and will be replaced by the latter in Rails 7\.0\./
|
||||
|
||||
assert_deprecated(message) do
|
||||
assert_equal [mary], david_and_mary.merge(mary_and_bob)
|
||||
|
|
Loading…
Reference in a new issue