summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-23 14:24:16 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-23 14:24:16 +0000
commit94f130cbfc0349c1b17d4882e7d5c367030b21d1 (patch)
treea6c0258c256bece75fc5a5fcecc4fa2f74daed2a /features/steps
parentb51fe6831123830f729295e16bd5aa99e3012c57 (diff)
parent4acd1f5d6a1942d4348b5d94e278fdb25c29e532 (diff)
downloadgitlab-ce-94f130cbfc0349c1b17d4882e7d5c367030b21d1.tar.gz
Merge branch 'admin-edit-identities' into 'master'
Admin can see, edit and remove user identities Related to #1415 and https://dev.gitlab.org/gitlab/gitlabhq/issues/2224 Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !843
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/admin/users.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 34a3ed9f615..6c4b91586d6 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -114,4 +114,45 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
step 'I should see the key removed' do
expect(page).not_to have_content 'ssh-rsa Key2'
end
+
+ step 'user "Pete" with twitter account' do
+ @user = create(:user, name: 'Pete')
+ @user.identities.create!(extern_uid: '123456', provider: 'twitter')
+ end
+
+ step 'I visit "Pete" identities page in admin' do
+ allow(Gitlab::OAuth::Provider).to receive(:names).and_return(%w(twitter twitter_updated))
+ visit admin_user_identities_path(@user)
+ end
+
+ step 'I should see twitter details' do
+ expect(page).to have_content 'Pete'
+ expect(page).to have_content 'twitter'
+ end
+
+ step 'I modify twitter identity' do
+ find('.table').find(:link, 'Edit').click
+ fill_in 'identity_extern_uid', with: '654321'
+ select 'twitter_updated', from: 'identity_provider'
+ click_button 'Save changes'
+ end
+
+ step 'I should see twitter details updated' do
+ expect(page).to have_content 'Pete'
+ expect(page).to have_content 'twitter_updated'
+ expect(page).to have_content '654321'
+ end
+
+ step 'I remove twitter identity' do
+ click_link 'Delete'
+ end
+
+ step 'I should not see twitter details' do
+ expect(page).to have_content 'Pete'
+ expect(page).to_not have_content 'twitter'
+ end
+
+ step 'click on ssh keys tab' do
+ click_link 'SSH keys'
+ end
end