summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAshley Ellis Pierce <anellis12@gmail.com>2022-02-24 15:50:17 +0000
committergit <svn-admin@ruby-lang.org>2022-04-06 08:54:59 +0900
commitb75b67f1136363ea54e9f79a4d63a9a355312f26 (patch)
treecce9f02beb701b378b688378e499a1fc976c460a /test
parentbb3ecdba6a48e9c82b651e74debcec1a10081126 (diff)
[rubygems/rubygems] Use YAML
https://github.com/rubygems/rubygems/commit/6122e8cac5
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_signin_command.rb4
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb
index 7efbcc77b4..1bbd341eca 100644
--- a/test/rubygems/test_gem_commands_push_command.rb
+++ b/test/rubygems/test_gem_commands_push_command.rb
@@ -435,7 +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
+ response_profile = "mfa: disabled\n"
@fetcher.data["#{@host}/api/v1/gems"] = [
[response_success, 200, "OK"],
@@ -446,7 +446,7 @@ class TestGemCommandsPushCommand < Gem::TestCase
["", 200, "OK"],
]
- @fetcher.data["#{@host}/api/v1/profile/me"] = [
+ @fetcher.data["#{@host}/api/v1/profile/me.yaml"] = [
[response_profile, 200, "OK"],
]
diff --git a/test/rubygems/test_gem_commands_signin_command.rb b/test/rubygems/test_gem_commands_signin_command.rb
index 524378f200..0c92b22718 100644
--- a/test/rubygems/test_gem_commands_signin_command.rb
+++ b/test/rubygems/test_gem_commands_signin_command.rb
@@ -196,7 +196,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
def util_capture(ui_stub = nil, host = nil, api_key = nil, fetcher = Gem::FakeFetcher.new, mfa_level = "disabled")
api_key ||= 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
response = [api_key, 200, 'OK']
- profile_response = [{"mfa" => mfa_level}.to_json, 200, 'OK']
+ profile_response = [ "mfa: #{mfa_level}\n" , 200, 'OK']
email = 'you@example.com'
password = 'secret'
@@ -204,7 +204,7 @@ class TestGemCommandsSigninCommand < Gem::TestCase
ENV['RUBYGEMS_HOST'] = host || Gem::DEFAULT_HOST
data_key = "#{ENV['RUBYGEMS_HOST']}/api/v1/api_key"
fetcher.data[data_key] = response
- profile = "#{ENV['RUBYGEMS_HOST']}/api/v1/profile/me"
+ profile = "#{ENV['RUBYGEMS_HOST']}/api/v1/profile/me.yaml"
fetcher.data[profile] = profile_response
Gem::RemoteFetcher.fetcher = fetcher
diff --git a/test/rubygems/test_gem_gemcutter_utilities.rb b/test/rubygems/test_gem_gemcutter_utilities.rb
index b3d105d3ad..667aba4701 100644
--- a/test/rubygems/test_gem_gemcutter_utilities.rb
+++ b/test/rubygems/test_gem_gemcutter_utilities.rb
@@ -229,7 +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']
+ profile_response = [ "mfa: disabled\n" , 200, 'OK']
if host
ENV['RUBYGEMS_HOST'] = host
@@ -239,7 +239,7 @@ class TestGemGemcutterUtilities < Gem::TestCase
@fetcher = Gem::FakeFetcher.new
@fetcher.data["#{host}/api/v1/api_key"] = response
- @fetcher.data["#{host}/api/v1/profile/me"] = profile_response
+ @fetcher.data["#{host}/api/v1/profile/me.yaml"] = 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)