Skip to content

Commit

Permalink
Add Rails 7.1 to the test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
orien committed Mar 19, 2024
1 parent 024da00 commit 9d5962b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
ruby: [ "3.3", "3.2", "3.1", "3.0" ]
rails: [ "7.0", "6.1"]
rails: [ "7.1", "7.0", "6.1"]
include:
- { ruby: "2.7", rails: "6.0" }
- { ruby: "2.7", rails: "5.2" }
Expand Down
3 changes: 3 additions & 0 deletions test/gemfiles/rails-7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"
gemspec path: "../.."
gem "activerecord", "~> 7.1.0"
3 changes: 2 additions & 1 deletion test/integration/mysql_integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class AfterPersistedTest < MySQLIntegrationTest
end

test "can't be used to inject SQL using .where" do
assert_raises MySQLBinUUID::InvalidUUID do
expected_error = ActiveRecord.version.to_s < "7.1" ? MySQLBinUUID::InvalidUUID : ActiveRecord::StatementInvalid
assert_raises(expected_error) do
MyUuidModel.where(the_uuid: "' OR ''='").first
end
end
Expand Down

0 comments on commit 9d5962b

Please sign in to comment.