Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-23 12:39:56 +0400
committerMarin Jankovski <marin@gitlab.com>2014-06-23 12:39:56 +0400
commitd12c1e90f8f3e9454d2a52f40854dadcdb2d822b (patch)
tree32746f28f3fcf81ffd3b81e4507ca4c32db9aabb /features/steps/admin
parent37425618bc5a15bb58ed6695d4932d309d452cb2 (diff)
Test secondary user email removal.
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/users.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 659008dd875..253c4609e82 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -44,4 +44,23 @@ class AdminUsers < Spinach::FeatureSteps
step 'click edit on my user' do
find("#edit_user_#{current_user.id}").click
end
+
+ step 'I view the user with secondary email' do
+ @user_with_secondary_email = User.last
+ @user_with_secondary_email.emails.new(email: "secondary@example.com")
+ @user_with_secondary_email.save
+ visit "/admin/users/#{@user_with_secondary_email.username}"
+ end
+
+ step 'I see the secondary email' do
+ page.should have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
+ end
+
+ step 'I click remove secondary email' do
+ find("#remove_email_#{@user_with_secondary_email.emails.last.id}").click
+ end
+
+ step 'I should not see secondary email anymore' do
+ page.should_not have_content "Secondary email:"
+ end
end