summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_push_command.rb
diff options
context:
space:
mode:
authorEric Herscovich <eric.herscovich@shopify.com>2023-03-20 14:44:25 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-04-12 11:59:18 +0900
commit1b1485ae4dd25fd4a8f2ee20608b11f5b2a486f8 (patch)
tree386218c985ac9383fe9aaeaf2f9e4067817fb17e /test/rubygems/test_gem_commands_push_command.rb
parentb909ca94bde1d547467ddf7bd5431a3399b542ee (diff)
downloadruby-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.rb4
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