Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -7,14 +7,14 @@ module ApiHelper
|
|||
let(:api_access_token) { create(:oauth2_access_token, resource_owner_id: user.id, scopes: api_scopes&.join(' ')).token }
|
||||
let(:api_authorization) { "Bearer #{api_access_token}" }
|
||||
|
||||
def self.it_handles_invalid_token(method, path, params_block = ->{ api_auth })
|
||||
def self.it_handles_invalid_token(method, path, params_block = -> { api_auth })
|
||||
context 'with invalid access token' do
|
||||
let(:api_access_token) { 'abc' }
|
||||
it { is_expected.to validate(method, path, 401, instance_exec(¶ms_block)) }
|
||||
end
|
||||
end
|
||||
|
||||
def self.it_handles_invalid_scope(method, path, params_block = ->{ api_auth })
|
||||
def self.it_handles_invalid_scope(method, path, params_block = -> { api_auth })
|
||||
context 'with invalid scope' do
|
||||
let(:api_scopes) { ['none'] }
|
||||
it { is_expected.to validate(method, path, 403, instance_exec(¶ms_block)) }
|
||||
|
|
@ -32,7 +32,6 @@ module ApiHelper
|
|||
# @return Query parameters with authentication header
|
||||
# @see Swagger::RspecHelpers#validate
|
||||
def api_auth(params = {})
|
||||
{'_headers' => {'Authorization' => api_authorization }}.deep_merge(params)
|
||||
{ '_headers' => { 'Authorization' => api_authorization } }.deep_merge(params)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue