diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/features/invites_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/features/invites_spec.rb')
-rw-r--r-- | spec/features/invites_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb index 34990a53b51..1091bea1ce3 100644 --- a/spec/features/invites_spec.rb +++ b/spec/features/invites_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Group or Project invitations', :aggregate_failures do +RSpec.describe 'Group or Project invitations', :aggregate_failures, feature_category: :experimentation_expansion do let_it_be(:owner) { create(:user, name: 'John Doe') } let_it_be(:group) { create(:group, name: 'Owned') } let_it_be(:project) { create(:project, :repository, namespace: group) } @@ -155,11 +155,10 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do let(:new_user) { build_stubbed(:user) } let(:invite_email) { new_user.email } let(:group_invite) { create(:group_member, :invited, group: group, invite_email: invite_email, created_by: owner) } - let(:send_email_confirmation) { true } let(:extra_params) { { invite_type: Emails::Members::INITIAL_INVITE } } before do - stub_application_setting(send_user_confirmation_email: send_email_confirmation) + stub_application_setting_enum('email_confirmation_setting', 'hard') end context 'when registering using invitation email' do @@ -181,7 +180,9 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do end context 'email confirmation disabled' do - let(:send_email_confirmation) { false } + before do + stub_application_setting_enum('email_confirmation_setting', 'off') + end context 'the user signs up for an account with the invitation email address' do it 'redirects to the most recent membership activity page with all the projects/groups invitations automatically accepted' do @@ -213,6 +214,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do expect { fill_in_sign_up_form(new_user) }.not_to change { User.count } expect(page).to have_content('prohibited this user from being saved') expect(page).to have_current_path(user_registration_path, ignore_query: true) + expect(find_field('Email').value).to eq(group_invite.invite_email) end end |