We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f91284 commit 93be5e4Copy full SHA for 93be5e4
test/integration/mysql_integration_test.rb
@@ -106,7 +106,9 @@ class AfterPersistedTest < MySQLIntegrationTest
106
end
107
108
test "can't be used to inject SQL using .where" do
109
- assert_raises MySQLBinUUID::InvalidUUID do
+ # In Rails 7.1, the gets wrapped in an ActiveRecord::StatementInvalid.
110
+ expected_error = ActiveRecord.version.to_s.start_with?("7.1") ? ActiveRecord::StatementInvalid : MySQLBinUUID::InvalidUUID
111
+ assert_raises(expected_error) do
112
MyUuidModel.where(the_uuid: "' OR ''='").first
113
114
0 commit comments