From 4abcf6340fb1f4fce1fa2bc4d41a9c37f2de80e4 Mon Sep 17 00:00:00 2001 From: Kenji Koshikawa Date: Mon, 23 Aug 2021 09:40:45 +0900 Subject: [PATCH] fix rubocop warnings. --- test/test_helper.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 40ce931..036faa1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -43,7 +43,8 @@ def add_mock_exchange_token secret = Base64.strict_encode64("#{@client_id}:#{@client_secret}") headers = {'Authorization' => "Basic #{secret}", 'Content-Type' => 'application/x-www-form-urlencoded'} res_headers = {'Content-Type' => 'application/json'} - stub_request(:post, url).with(headers: headers).to_return(status: 200, body: dummy_token_response.to_json, headers: res_headers) + stub_request(:post, url).with(headers: headers).to_return(status: 200, body: dummy_token_response.to_json, + headers: res_headers) end def dummy_token_response @@ -61,7 +62,8 @@ def add_mock_user_info url = 'https://zoom.us/v2/users/me' headers = {'Authorization' => "Bearer #{@access_token}"} res_headers = {'Content-Type' => 'application/json'} - stub_request(:get, url).with(headers: headers).to_return(status: 200, body: dummy_user_info_response.to_json, headers: res_headers) + stub_request(:get, url).with(headers: headers).to_return(status: 200, body: dummy_user_info_response.to_json, + headers: res_headers) end def add_mock_user_info_then_fail_because_of_missing_scope @@ -82,7 +84,7 @@ def add_mock_user_info_then_fail_because_of_unknown stub_request(:get, url).with(headers: headers).to_return(status: 500, body: response.to_json, headers: res_headers) end - def dummy_user_info_response + def dummy_user_info_response # rubocop:disable Metrics/MethodLength { id: 'KdYKjnimT4KPd8FFgQt9FQ', first_name: 'Jane',