diff options
author | Eric Herscovich <eric.herscovich@shopify.com> | 2023-03-20 14:44:25 -0400 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-04-12 11:59:18 +0900 |
commit | 1b1485ae4dd25fd4a8f2ee20608b11f5b2a486f8 (patch) | |
tree | 386218c985ac9383fe9aaeaf2f9e4067817fb17e /test/rubygems/test_gem_commands_push_command.rb | |
parent | b909ca94bde1d547467ddf7bd5431a3399b542ee (diff) | |
download | ruby-1b1485ae4dd25fd4a8f2ee20608b11f5b2a486f8.tar.gz |
Add message for otp bypass
Update tests
Fix wording of message
Diffstat (limited to 'test/rubygems/test_gem_commands_push_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_push_command.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb index 3f5ba70273..c8de71823d 100644 --- a/test/rubygems/test_gem_commands_push_command.rb +++ b/test/rubygems/test_gem_commands_push_command.rb @@ -449,7 +449,7 @@ class TestGemCommandsPushCommand < Gem::TestCase end url_with_port = "#{webauthn_verification_url}?port=#{port}" - assert_match "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device.", @ui.output + assert_match "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device. If you can't verify using WebAuthn but have OTP enabled, you can re-run the gem signin command with the `--otp [your_code]` option.", @ui.output assert_match "You are verified with a security device. You may close the browser window.", @ui.output assert_equal "Uvh6T57tkWuUnWYo", @fetcher.last_request["OTP"] assert_match response_success, @ui.output @@ -483,7 +483,7 @@ class TestGemCommandsPushCommand < Gem::TestCase assert_equal 1, error.exit_code url_with_port = "#{webauthn_verification_url}?port=#{port}" - assert_match "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device.", @ui.output + assert_match "You have enabled multi-factor authentication. Please visit #{url_with_port} to authenticate via security device. If you can't verify using WebAuthn but have OTP enabled, you can re-run the gem signin command with the `--otp [your_code]` option.", @ui.output assert_match "ERROR: Security device verification failed: Something went wrong", @ui.error refute_match "You are verified with a security device. You may close the browser window.", @ui.output refute_match response_success, @ui.output |