mirror of https://github.com/rails/rails
Fix failing test with mysql 5.7
It turns out that buildkite CI was running with mysql 8 and that means we weren't testing the behavior of mysql 5.7. This fixes a failing test in main due to the difference in error message.
This commit is contained in:
parent
05ae3faaf3
commit
fde43b558a
|
@ -716,6 +716,8 @@ if ActiveRecord::Base.connection.supports_foreign_keys?
|
|||
assert_match(/Duplicate key on write or update/, error.message)
|
||||
elsif ActiveRecord::Base.connection.database_version < "5.6"
|
||||
assert_match(/Can't create table/, error.message)
|
||||
elsif ActiveRecord::Base.connection.database_version < "8.0"
|
||||
assert_match(/Can't write\; duplicate key in table/, error.message)
|
||||
else
|
||||
assert_match(/Duplicate foreign key constraint name/, error.message)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue