From d04852fa47f5762f88ab91c2653d2f6224932406 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 20 Mar 2024 17:05:28 +0000 Subject: [PATCH] Fix warning on unescaped hyphen in regexp --- test/system/user_email_change_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/user_email_change_test.rb b/test/system/user_email_change_test.rb index eceb73416..ec2c8f093 100644 --- a/test/system/user_email_change_test.rb +++ b/test/system/user_email_change_test.rb @@ -21,9 +21,9 @@ class UserEmailChangeTest < ApplicationSystemTestCase email = ActionMailer::Base.deliveries.first assert_equal 1, email.to.count assert_equal "new_tester@example.com", email.to.first - assert_match %r{/user/confirm-email\?confirm_string=[A-Za-z0-9-_%]+\s}, email.parts[0].parts[0].decoded + assert_match %r{/user/confirm-email\?confirm_string=[A-Za-z0-9\-_%]+\s}, email.parts[0].parts[0].decoded - if email.parts[0].parts[0].decoded =~ %r{(/user/confirm-email\?confirm_string=[A-Za-z0-9-_%]+)\s} + if email.parts[0].parts[0].decoded =~ %r{(/user/confirm-email\?confirm_string=[A-Za-z0-9\-_%]+)\s} visit Regexp.last_match(1) assert page.has_css?("body.accounts-edit") end -- 2.39.5