diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/features/users/add_email_to_existing_account_spec.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/features/users/add_email_to_existing_account_spec.rb')
-rw-r--r-- | spec/features/users/add_email_to_existing_account_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/features/users/add_email_to_existing_account_spec.rb b/spec/features/users/add_email_to_existing_account_spec.rb index 9130b96b0e3..cf78fc4587f 100644 --- a/spec/features/users/add_email_to_existing_account_spec.rb +++ b/spec/features/users/add_email_to_existing_account_spec.rb @@ -4,13 +4,25 @@ require 'spec_helper' RSpec.describe 'AdditionalEmailToExistingAccount' do describe 'add secondary email associated with account' do - let(:user) { create(:user) } + let_it_be(:user) { create(:user) } + let_it_be(:email) { create(:email, user: user) } - it 'verifies confirmation of additional email' do + before do sign_in(user) + end + + it 'verifies confirmation of additional email' do + visit email_confirmation_path(confirmation_token: email.confirmation_token) + + expect(page).to have_content 'Your email address has been successfully confirmed.' + end + + it 'accepts any pending invites for an email confirmation' do + member = create(:group_member, :invited, invite_email: email.email) - email = create(:email, user: user) visit email_confirmation_path(confirmation_token: email.confirmation_token) + + expect(member.reload.user).to eq(user) expect(page).to have_content 'Your email address has been successfully confirmed.' end end |