lint pass 2 (#8878)
* Code quality pass * Typofix * Update applications_controller_spec.rb * Update applications_controller_spec.rb
This commit is contained in:
parent
a46ab86adf
commit
0a4739c732
15 changed files with 47 additions and 46 deletions
|
@ -24,7 +24,7 @@ describe Admin::StatusesController do
|
|||
end
|
||||
|
||||
it 'returns http success with media' do
|
||||
get :index, params: { account_id: account.id , media: true }
|
||||
get :index, params: { account_id: account.id, media: true }
|
||||
|
||||
statuses = assigns(:statuses).to_a
|
||||
expect(statuses.size).to eq 1
|
||||
|
|
|
@ -8,6 +8,7 @@ describe ApplicationController, type: :controller do
|
|||
def index
|
||||
send_export_file
|
||||
end
|
||||
|
||||
def export_data
|
||||
@export.account.username
|
||||
end
|
||||
|
|
|
@ -47,13 +47,13 @@ describe Settings::ApplicationsController do
|
|||
context 'success (passed scopes as a String)' do
|
||||
def call_create
|
||||
post :create, params: {
|
||||
doorkeeper_application: {
|
||||
name: 'My New App',
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
website: 'http://google.com',
|
||||
scopes: 'read write follow'
|
||||
}
|
||||
}
|
||||
doorkeeper_application: {
|
||||
name: 'My New App',
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
website: 'http://google.com',
|
||||
scopes: 'read write follow'
|
||||
}
|
||||
}
|
||||
response
|
||||
end
|
||||
|
||||
|
@ -69,13 +69,13 @@ describe Settings::ApplicationsController do
|
|||
context 'success (passed scopes as an Array)' do
|
||||
def call_create
|
||||
post :create, params: {
|
||||
doorkeeper_application: {
|
||||
name: 'My New App',
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
website: 'http://google.com',
|
||||
scopes: [ 'read', 'write', 'follow' ]
|
||||
}
|
||||
}
|
||||
doorkeeper_application: {
|
||||
name: 'My New App',
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
website: 'http://google.com',
|
||||
scopes: [ 'read', 'write', 'follow' ]
|
||||
}
|
||||
}
|
||||
response
|
||||
end
|
||||
|
||||
|
@ -91,13 +91,13 @@ describe Settings::ApplicationsController do
|
|||
context 'failure' do
|
||||
before do
|
||||
post :create, params: {
|
||||
doorkeeper_application: {
|
||||
name: '',
|
||||
redirect_uri: '',
|
||||
website: '',
|
||||
scopes: []
|
||||
}
|
||||
}
|
||||
doorkeeper_application: {
|
||||
name: '',
|
||||
redirect_uri: '',
|
||||
website: '',
|
||||
scopes: []
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
|
@ -120,9 +120,9 @@ describe Settings::ApplicationsController do
|
|||
|
||||
def call_update
|
||||
patch :update, params: {
|
||||
id: app.id,
|
||||
doorkeeper_application: opts
|
||||
}
|
||||
id: app.id,
|
||||
doorkeeper_application: opts
|
||||
}
|
||||
response
|
||||
end
|
||||
|
||||
|
@ -139,14 +139,14 @@ describe Settings::ApplicationsController do
|
|||
context 'failure' do
|
||||
before do
|
||||
patch :update, params: {
|
||||
id: app.id,
|
||||
doorkeeper_application: {
|
||||
name: '',
|
||||
redirect_uri: '',
|
||||
website: '',
|
||||
scopes: []
|
||||
}
|
||||
}
|
||||
id: app.id,
|
||||
doorkeeper_application: {
|
||||
name: '',
|
||||
redirect_uri: '',
|
||||
website: '',
|
||||
scopes: []
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue