Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
91211e1ba465
Unverified
Commit
aadfb366
authored
Dec 25, 2014
by
Dmitriy Zaporozhets
Browse files
Fix tests and add message if no oauth apps
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
20d963f11034
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/controllers/oauth/applications_controller.rb
View file @
91211e1b
...
...
@@ -26,7 +26,7 @@ def destroy
flash
[
:notice
]
=
I18n
.
t
(
:notice
,
scope:
[
:doorkeeper
,
:flash
,
:applications
,
:destroy
])
end
redirect_to
profile_account
_url
redirect_to
applications_profile
_url
end
private
...
...
app/views/profiles/applications.html.haml
View file @
91211e1b
...
...
@@ -26,18 +26,22 @@
%fieldset
.oauth-authorized-applications.prepend-top-20
%legend
Authorized applications
%table
.table.table-striped
%thead
%tr
%th
Name
%th
Authorized At
%th
Scope
%th
%tbody
-
@authorized_tokens
.
each
do
|
token
|
-
application
=
token
.
application
%tr
{
:id
=>
"application_#{application.id}"
}
%td
=
application
.
name
%td
=
token
.
created_at
%td
=
token
.
scopes
%td
=
render
'doorkeeper/authorized_applications/delete_form'
,
application:
application
-
if
@authorized_tokens
.
any?
%table
.table.table-striped
%thead
%tr
%th
Name
%th
Authorized At
%th
Scope
%th
%tbody
-
@authorized_tokens
.
each
do
|
token
|
-
application
=
token
.
application
%tr
{
:id
=>
"application_#{application.id}"
}
%td
=
application
.
name
%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 @
91211e1b
...
...
@@ -72,7 +72,7 @@ Feature: Profile
Then
I should see my user page
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
And
I should see application form
Then
I fill application form out and submit
...
...
@@ -81,7 +81,7 @@ Feature: Profile
And
I see edit application form
Then
I change name of application and submit
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
Then
I see that application is removed
...
...
@@ -115,4 +115,4 @@ Feature: Profile
Scenario
:
I
see the password strength indicator with success
Given
I visit profile password page
When
I try to set a strong password
Then
I should see the input field green
\ No newline at end of file
Then
I should see the input field green
features/steps/shared/paths.rb
View file @
91211e1b
...
...
@@ -94,6 +94,10 @@ module SharedPaths
visit
profile_path
end
step
'I visit profile applications page'
do
visit
applications_profile_path
end
step
'I visit profile password page'
do
visit
edit_profile_password_path
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