Skip to content

Commit

Permalink
Fix ambiguous regex warnings, See #720
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk authored Sep 30, 2024
1 parent 3333f0a commit aa9bf70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/utils_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ def result(duration, reference = 0)
end

it 'successfully decrypts with the first private key' do
assert_match /\A<saml:Assertion/, RubySaml::Utils.decrypt_multi(encrypted, [private_key])
assert_match %r{\A<saml:Assertion}, RubySaml::Utils.decrypt_multi(encrypted, [private_key])
end

it 'successfully decrypts with a subsequent private key' do
assert_match /\A<saml:Assertion/, RubySaml::Utils.decrypt_multi(encrypted, [invalid_key1, private_key])
assert_match %r{\A<saml:Assertion}, RubySaml::Utils.decrypt_multi(encrypted, [invalid_key1, private_key])
end

it 'raises an error when there is only one key and it fails to decrypt' do
Expand Down

0 comments on commit aa9bf70

Please sign in to comment.