Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: db/migrate/20170716191202_add_hide_notifications_to_mute.rb spec/controllers/application_controller_spec.rb Took our version, upstream changes were only minor style linting.
This commit is contained in:
@@ -21,7 +21,6 @@ describe Settings::ApplicationsController do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'GET #show' do
|
||||
it 'returns http success' do
|
||||
get :show, params: { id: app.id }
|
||||
@@ -48,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
|
||||
|
||||
@@ -70,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
|
||||
|
||||
@@ -92,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
|
||||
@@ -121,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
|
||||
|
||||
@@ -140,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
|
||||
|
@@ -10,7 +10,6 @@ describe Settings::MigrationsController do
|
||||
end
|
||||
|
||||
describe 'GET #show' do
|
||||
|
||||
context 'when user is not sign in' do
|
||||
subject { get :show }
|
||||
|
||||
@@ -45,7 +44,6 @@ describe Settings::MigrationsController do
|
||||
end
|
||||
|
||||
describe 'PUT #update' do
|
||||
|
||||
context 'when user is not sign in' do
|
||||
subject { put :update }
|
||||
|
||||
|
@@ -50,7 +50,7 @@ describe Settings::TwoFactorAuthentication::ConfirmationsController do
|
||||
|
||||
describe 'when form_two_factor_confirmation parameter is not provided' do
|
||||
it 'raises ActionController::ParameterMissing' do
|
||||
expect { post :create, params: { } }.to raise_error(ActionController::ParameterMissing)
|
||||
expect { post :create, params: {} }.to raise_error(ActionController::ParameterMissing)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user