summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_push_command.rb
diff options
context:
space:
mode:
authorAshley Ellis Pierce <anellis12@gmail.com>2022-01-24 15:25:28 -0500
committergit <svn-admin@ruby-lang.org>2022-04-06 08:54:54 +0900
commitb3f1b3ccef6f61b95685690e5a8faaa3f009c25f (patch)
tree1ec0750cf7a6b76579beeeafaa2859fe022bc2ef /test/rubygems/test_gem_commands_push_command.rb
parent8ee4a82e8cfe6f39abeb60013447bdd2a3a3c61f (diff)
[rubygems/rubygems] Enable mfa on specific keys during gem signin
https://github.com/rubygems/rubygems/commit/e787f7f655
Diffstat (limited to 'test/rubygems/test_gem_commands_push_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb
index fa3968ffce..e219ae170e 100644
--- a/test/rubygems/test_gem_commands_push_command.rb
+++ b/test/rubygems/test_gem_commands_push_command.rb
@@ -435,6 +435,7 @@ class TestGemCommandsPushCommand < Gem::TestCase
response_mfa_enabled = "You have enabled multifactor authentication but your request doesn't have the correct OTP code. Please check it and retry."
response_success = 'Successfully registered gem: freewill (1.0.0)'
+ response_profile = {"mfa" => "disabled"}.to_json
@fetcher.data["#{@host}/api/v1/gems"] = [
[response_success, 200, "OK"],
@@ -445,6 +446,10 @@ class TestGemCommandsPushCommand < Gem::TestCase
["", 200, "OK"],
]
+ @fetcher.data["#{@host}/api/v1/profile"] = [
+ [response_profile, 200, "OK"],
+ ]
+
@cmd.instance_variable_set :@scope, :push_rubygem
@cmd.options[:args] = [@path]
@cmd.options[:host] = @host