summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-02 17:14:42 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-02 17:14:42 +0300
commitc41805f60e6b0fe97ca545a1ac99cbb1e0406100 (patch)
tree633bc48f5651813890245a7fc0a457d05a15099d /features
parentb82d4018b85829b5dbb2b0a0bdfad960e78c4f8f (diff)
downloadgitlab-ce-c41805f60e6b0fe97ca545a1ac99cbb1e0406100.tar.gz
Add test for broken admin user page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/admin/users.feature6
-rw-r--r--features/steps/admin/users.rb19
2 files changed, 25 insertions, 0 deletions
diff --git a/features/admin/users.feature b/features/admin/users.feature
index d8c1288e5f0..278f6a43e94 100644
--- a/features/admin/users.feature
+++ b/features/admin/users.feature
@@ -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
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 3422dc2b5af..546c1bf2a12 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -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