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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
aadfb366
Commit
aadfb366
authored
Dec 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and add message if no oauth apps
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
592e3968
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
19 deletions
+27
-19
app/controllers/oauth/applications_controller.rb
app/controllers/oauth/applications_controller.rb
+1
-1
app/views/profiles/applications.html.haml
app/views/profiles/applications.html.haml
+19
-15
features/profile/profile.feature
features/profile/profile.feature
+3
-3
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
No files found.
app/controllers/oauth/applications_controller.rb
View file @
aadfb366
...
@@ -26,7 +26,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
...
@@ -26,7 +26,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
flash
[
:notice
]
=
I18n
.
t
(
:notice
,
scope:
[
:doorkeeper
,
:flash
,
:applications
,
:destroy
])
flash
[
:notice
]
=
I18n
.
t
(
:notice
,
scope:
[
:doorkeeper
,
:flash
,
:applications
,
:destroy
])
end
end
redirect_to
profile_account
_url
redirect_to
applications_profile
_url
end
end
private
private
...
...
app/views/profiles/applications.html.haml
View file @
aadfb366
...
@@ -26,18 +26,22 @@
...
@@ -26,18 +26,22 @@
%fieldset
.oauth-authorized-applications.prepend-top-20
%fieldset
.oauth-authorized-applications.prepend-top-20
%legend
Authorized applications
%legend
Authorized applications
%table
.table.table-striped
%thead
-
if
@authorized_tokens
.
any?
%tr
%table
.table.table-striped
%th
Name
%thead
%th
Authorized At
%tr
%th
Scope
%th
Name
%th
%th
Authorized At
%tbody
%th
Scope
-
@authorized_tokens
.
each
do
|
token
|
%th
-
application
=
token
.
application
%tbody
%tr
{
:id
=>
"application_#{application.id}"
}
-
@authorized_tokens
.
each
do
|
token
|
%td
=
application
.
name
-
application
=
token
.
application
%td
=
token
.
created_at
%tr
{
:id
=>
"application_#{application.id}"
}
%td
=
token
.
scopes
%td
=
application
.
name
%td
=
render
'doorkeeper/authorized_applications/delete_form'
,
application:
application
%td
=
token
.
created_at
%td
=
token
.
scopes
%td
=
render
'doorkeeper/authorized_applications/delete_form'
,
application:
application
-
else
%p
.light
You dont have any authorized applications
features/profile/profile.feature
View file @
aadfb366
...
@@ -72,7 +72,7 @@ Feature: Profile
...
@@ -72,7 +72,7 @@ Feature: Profile
Then
I should see my user page
Then
I should see my user page
Scenario
:
I
can manage application
Scenario
:
I
can manage application
Given
I visit profile a
ccount
page
Given
I visit profile a
pplications
page
Then
I click on new application button
Then
I click on new application button
And
I should see application form
And
I should see application form
Then
I fill application form out and submit
Then
I fill application form out and submit
...
@@ -81,7 +81,7 @@ Feature: Profile
...
@@ -81,7 +81,7 @@ Feature: Profile
And
I see edit application form
And
I see edit application form
Then
I change name of application and submit
Then
I change name of application and submit
And
I see that application was changed
And
I see that application was changed
Then
I visit profile a
ccount
page
Then
I visit profile a
pplications
page
And
I click to remove application
And
I click to remove application
Then
I see that application is removed
Then
I see that application is removed
...
@@ -115,4 +115,4 @@ Feature: Profile
...
@@ -115,4 +115,4 @@ Feature: Profile
Scenario
:
I
see the password strength indicator with success
Scenario
:
I
see the password strength indicator with success
Given
I visit profile password page
Given
I visit profile password page
When
I try to set a strong password
When
I try to set a strong password
Then
I should see the input field green
Then
I should see the input field green
\ No newline at end of file
features/steps/shared/paths.rb
View file @
aadfb366
...
@@ -94,6 +94,10 @@ module SharedPaths
...
@@ -94,6 +94,10 @@ module SharedPaths
visit
profile_path
visit
profile_path
end
end
step
'I visit profile applications page'
do
visit
applications_profile_path
end
step
'I visit profile password page'
do
step
'I visit profile password page'
do
visit
edit_profile_password_path
visit
edit_profile_password_path
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