Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
fix rubocop warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
koshilife committed Aug 23, 2021
1 parent 294b203 commit 4abcf63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand Down

0 comments on commit 4abcf63

Please sign in to comment.