Add test for broken admin user page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-10-02 17:14:42 +03:00
parent b82d4018b8
commit c41805f60e
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
2 changed files with 25 additions and 0 deletions

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