blob: cf78fc4587f898ce404819d5ad56705e11ed36ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'AdditionalEmailToExistingAccount' do
describe 'add secondary email associated with account' do
let_it_be(:user) { create(:user) }
let_it_be(:email) { create(:email, user: user) }
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)
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
end
|