From b75b67f1136363ea54e9f79a4d63a9a355312f26 Mon Sep 17 00:00:00 2001 From: Ashley Ellis Pierce Date: Thu, 24 Feb 2022 15:50:17 +0000 Subject: [rubygems/rubygems] Use YAML https://github.com/rubygems/rubygems/commit/6122e8cac5 --- test/rubygems/test_gem_commands_push_command.rb | 4 ++-- test/rubygems/test_gem_commands_signin_command.rb | 4 ++-- test/rubygems/test_gem_gemcutter_utilities.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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) -- cgit v1.2.3