Commit aadfb366 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests and add message if no oauth apps

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 592e3968
...@@ -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
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
%fieldset.oauth-authorized-applications.prepend-top-20 %fieldset.oauth-authorized-applications.prepend-top-20
%legend Authorized applications %legend Authorized applications
- if @authorized_tokens.any?
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
...@@ -41,3 +43,5 @@ ...@@ -41,3 +43,5 @@
%td= token.created_at %td= token.created_at
%td= token.scopes %td= token.scopes
%td= render 'doorkeeper/authorized_applications/delete_form', application: application %td= render 'doorkeeper/authorized_applications/delete_form', application: application
- else
%p.light You dont have any authorized applications
...@@ -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 account page Given I visit profile applications 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 account page Then I visit profile applications 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
......
...@@ -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
......
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