Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6b87515c
Commit
6b87515c
authored
Oct 23, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs and small bug
parent
187d513c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
app/controllers/oauth/applications_controller.rb
app/controllers/oauth/applications_controller.rb
+2
-2
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+0
-1
spec/controllers/oauth/applications_controller_spec.rb
spec/controllers/oauth/applications_controller_spec.rb
+1
-1
No files found.
app/controllers/oauth/applications_controller.rb
View file @
6b87515c
...
...
@@ -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
.
persi
s
ted?
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
...
...
app/controllers/profiles/keys_controller.rb
View file @
6b87515c
class
Profiles::KeysController
<
Profiles
::
ApplicationController
skip_before_action
:authenticate_user!
,
only:
[
:get_keys
]
def
index
...
...
spec/controllers/oauth/applications_controller_spec.rb
View file @
6b87515c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment