aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_gemcutter_utilities.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_gemcutter_utilities.rb
parent8ee4a82e8cfe6f39abeb60013447bdd2a3a3c61f (diff)
downloadruby-b3f1b3ccef6f61b95685690e5a8faaa3f009c25f.tar.gz
[rubygems/rubygems] Enable mfa on specific keys during gem signin
https://github.com/rubygems/rubygems/commit/e787f7f655
Diffstat (limited to 'test/rubygems/test_gem_gemcutter_utilities.rb')
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_gemcutter_utilities.rb b/test/rubygems/test_gem_gemcutter_utilities.rb
index 0bcd1504e9..6eebea6ca7 100644
--- a/test/rubygems/test_gem_gemcutter_utilities.rb
+++ b/test/rubygems/test_gem_gemcutter_utilities.rb
@@ -229,6 +229,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
def util_sign_in(response, host = nil, args = [], extra_input = '')
email = 'you@example.com'
password = 'secret'
+ profile_response =[{"mfa" => "disabled"}.to_json, 200, 'OK']
if host
ENV['RUBYGEMS_HOST'] = host
@@ -238,6 +239,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
@fetcher = Gem::FakeFetcher.new
@fetcher.data["#{host}/api/v1/api_key"] = response
+ @fetcher.data["#{host}/api/v1/profile"] = profile_response
Gem::RemoteFetcher.fetcher = @fetcher
@sign_in_ui = Gem::MockGemUi.new("#{email}\n#{password}\n\n\n\n\n\n\n\n\n" + extra_input)