Commit f459e76a authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '296507-remove-email-confirmation-in-group-creation-for-onboarding' into 'master'

Remove email confirmation in group creation for onboarding

See merge request gitlab-org/gitlab!51331
parents df16a2f2 b215a2fa
...@@ -45,6 +45,12 @@ module Registrations ...@@ -45,6 +45,12 @@ module Registrations
redirect_to new_users_sign_up_project_path(url_params) redirect_to new_users_sign_up_project_path(url_params)
end end
protected
def show_confirm_warning?
false
end
private private
def authorize_create_group! def authorize_create_group!
......
...@@ -5,6 +5,26 @@ require 'spec_helper' ...@@ -5,6 +5,26 @@ require 'spec_helper'
RSpec.describe Registrations::GroupsController do RSpec.describe Registrations::GroupsController do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
shared_examples 'hides email confirmation warning' do
RSpec::Matchers.define :set_confirm_warning_for do |email|
match do |response|
expect(response).to set_flash.now[:warning].to include("Please check your email (#{email}) to verify that you own this address and unlock the power of CI/CD.")
end
end
context 'with an unconfirmed email address present' do
let(:user) { create(:user, confirmed_at: nil, unconfirmed_email: 'unconfirmed@gitlab.com') }
it { is_expected.not_to set_confirm_warning_for(user.unconfirmed_email) }
end
context 'without an unconfirmed email address present' do
let(:user) { create(:user, confirmed_at: nil) }
it { is_expected.not_to set_confirm_warning_for(user.email) }
end
end
describe 'GET #new' do describe 'GET #new' do
subject { get :new } subject { get :new }
...@@ -48,6 +68,8 @@ RSpec.describe Registrations::GroupsController do ...@@ -48,6 +68,8 @@ RSpec.describe Registrations::GroupsController do
it { is_expected.to have_gitlab_http_status(:not_found) } it { is_expected.to have_gitlab_http_status(:not_found) }
end end
it_behaves_like 'hides email confirmation warning'
end end
end end
...@@ -172,6 +194,7 @@ RSpec.describe Registrations::GroupsController do ...@@ -172,6 +194,7 @@ RSpec.describe Registrations::GroupsController do
end end
end end
it_behaves_like 'hides email confirmation warning'
it_behaves_like GroupInviteMembers it_behaves_like GroupInviteMembers
context 'when the trial onboarding is active' do context 'when the trial onboarding is active' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment