diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-13 22:36:39 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-13 22:36:39 +0200 |
commit | c8e1c53f43aa09c5e801cdcdc8f4b44576b34274 (patch) | |
tree | a1117aebab052fdd3783154327c79946459c8b71 /features/steps/admin/users.rb | |
parent | 3f2d94105b9671fc7ccfd5e18631e525f8a7015d (diff) | |
parent | 170340e6b15f91e79cf683c892ec887c3115b317 (diff) | |
download | gitlab-ce-c8e1c53f43aa09c5e801cdcdc8f4b44576b34274.tar.gz |
Merge branch 'rm-dir-prefix' of https://github.com/cirosantilli/gitlab-elearn into cirosantilli-rm-dir-prefix
Diffstat (limited to 'features/steps/admin/users.rb')
-rw-r--r-- | features/steps/admin/users.rb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb new file mode 100644 index 00000000000..659008dd875 --- /dev/null +++ b/features/steps/admin/users.rb @@ -0,0 +1,47 @@ +class AdminUsers < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + + Then 'I should see all users' do + User.all.each do |user| + page.should have_content user.name + end + end + + And 'Click edit' do + @user = User.first + find("#edit_user_#{@user.id}").click + end + + And 'Input non ascii char in username' do + fill_in 'user_username', with: "\u3042\u3044" + end + + And 'Click save' do + click_button("Save") + end + + Then 'See username error message' do + within "#error_explanation" do + page.should have_content "Username" + end + end + + And 'Not changed form action url' do + page.should have_selector %(form[action="/admin/users/#{@user.username}"]) + end + + step 'I submit modified user' do + check :user_can_create_group + click_button 'Save' + end + + step 'I see user attributes changed' do + page.should have_content 'Can create groups: Yes' + end + + step 'click edit on my user' do + find("#edit_user_#{current_user.id}").click + end +end |