Commit 6b87515c authored by James Lopez's avatar James Lopez

fix specs and small bug

parent 187d513c
......@@ -18,7 +18,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
def create
@application = Applications::CreateService.new(current_user, create_application_params).execute
if @application.persited?
if @application.persisted?
flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create])
redirect_to oauth_application_url(@application)
......@@ -57,7 +57,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
def create_application_params
application_params.tap do |params|
params[:doorkeeper_application][:owner] = current_user
params[:owner] = current_user
params[:ip_address] = request.remote_ip
end
end
......
class Profiles::KeysController < Profiles::ApplicationController
skip_before_action :authenticate_user!, only: [:get_keys]
def index
......
......@@ -35,7 +35,7 @@ describe Oauth::ApplicationsController do
application = build(:oauth_application)
application_attributes = application.attributes.merge(scopes: [])
expect { post :create, doorkeeper_application: application_attributes }.to change { SecurityEvent.count }.by(1)
expect { post :create, doorkeeper_application: application_attributes }.to change { SecurityEvent.count }.by(1)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment