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
|
||||
|
|
|
|||
|
|
@ -7,4 +7,3 @@ module Faker
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# @see http://stackoverflow.com/a/11048669/2866660
|
||||
def scrolldown
|
||||
page.execute_script "window.scrollBy(0,10000)"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
module SessionHelper
|
||||
|
||||
def login(user=nil, password=nil)
|
||||
def login(user = nil, password = nil)
|
||||
visit login_path
|
||||
user = FactoryBot.create :user if user.nil?
|
||||
if user.instance_of? ::User
|
||||
|
|
@ -13,5 +11,4 @@ module SessionHelper
|
|||
fill_in 'password', :with => password
|
||||
find('input[type=submit]').click
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ ActiveSupport.on_load(:after_initialize) do
|
|||
def category
|
||||
ArticleCategory.where(id: article_category_id).first
|
||||
end
|
||||
|
||||
def self.find_by_number(n)
|
||||
find_by_order_number(n)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue