From: Martyn Taylor mtaylor@redhat.com
--- src/app/views/users/index.haml | 4 +++- src/features/user.feature | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/app/views/users/index.haml b/src/app/views/users/index.haml index d0a5d7e..8ec3178 100644 --- a/src/app/views/users/index.haml +++ b/src/app/views/users/index.haml @@ -26,16 +26,18 @@ =link_to "Quota", users_url(:sort_by => "quota") %span (Instances) %th= link_to "e-mail", users_url(:sort_by => "email") + %th -@users.each do |user| %tr %td %input{:name => "user_checkbox", :type => "radio", :value => user.id, :id => "user_checkbox_#{user.id}" } - %td= link_to user.login, {:action => "edit", :id => user.id} + %td= link_to user.login, user_path(user) %td= user.last_name %td= user.first_name %td= sprintf("%.2f", user.quota.percentage_used) %td= Quota.no_limit(user.quota.maximum_running_instances) ? "Unlimited" : user.quota.maximum_running_instances %td= user.email + %td= link_to "edit", edit_user_path(user)
:javascript $(document).ready(function () { diff --git a/src/features/user.feature b/src/features/user.feature index 2c3921c..1a2353c 100644 --- a/src/features/user.feature +++ b/src/features/user.feature @@ -11,7 +11,7 @@ Feature: Manage Users Scenario: Change the password Given I am on the users page And there is a user "testuser" - When I follow "testuser" + When I follow "edit" Then I should see "Editing User:" When I fill in "user[password]" with "new password" And I fill in "user[password_confirmation]" with "" @@ -34,3 +34,10 @@ Feature: Manage Users When I follow "cancel" Then there should only be 2 users And I should be on the users page + + Scenario: Navigate to show user + Given I am on the users page + And there is a user "testuser" + When I follow "testuser" + Then I should be on testuser's user page + And I should see "testuser" \ No newline at end of file
deltacloud-devel@lists.fedorahosted.org