Merge branch 'fix-500-admin-user-page' into 'master'

Fix 500 admin user page

See merge request !1147
This commit is contained in:
Dmitriy Zaporozhets 2014-10-02 16:24:23 +00:00
commit 1a09a805ea
3 changed files with 26 additions and 1 deletions

View file

@ -171,7 +171,7 @@
.pull-right
%span.light= user_group.human_access
- unless user_group.owner?
= link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
= link_to group_group_member_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-remove.icon-white
- else
.nothing-here-block This user has no groups.

View file

@ -16,6 +16,12 @@ Feature: Admin Users
Then See username error message
And Not changed form action url
Scenario: Show user attributes
Given user "Mike" with groups and projects
Given I visit admin users page
And click on "Mike" link
Then I should see user "Mike" details
Scenario: Edit my user attributes
Given I visit admin users page
And click edit on my user

View file

@ -63,4 +63,23 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
step 'I should not see secondary email anymore' do
page.should_not have_content "Secondary email:"
end
step 'user "Mike" with groups and projects' do
user = create(:user, name: 'Mike')
project = create(:empty_project)
project.team << [user, :developer]
group = create(:group)
group.add_user(user, Gitlab::Access::DEVELOPER)
end
step 'click on "Mike" link' do
click_link "Mike"
end
step 'I should see user "Mike" details' do
page.should have_content 'Account'
page.should have_content 'Personal projects limit'
end
end