Commit b7376396 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '231228-remove-confirm-email-from-trial-form' into 'master'

Remove confirm email from trial form

See merge request gitlab-org/gitlab!43683
parents c934e1b2 08195790
......@@ -38,6 +38,13 @@ class TrialsController < ApplicationController
end
end
protected
# override the ConfirmEmailWarning method in order to skip
def show_confirm_warning?
false
end
private
def authenticate_user!
......
---
title: Remove confirm email from trial form
merge_request: 43683
author:
type: fixed
......@@ -229,4 +229,32 @@ RSpec.describe TrialsController do
post :apply, params: post_params
end
end
describe 'confirm email warning' do
before do
get :new
end
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') }
before do
sign_in(user)
end
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
end
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