Commit 9766c90e authored by Alper Akgun's avatar Alper Akgun

Remove feature flag for new trial signup

We enable the trial signup on gitlab.com forever
parent e9350d05
......@@ -8,7 +8,6 @@ class TrialRegistrationsController < RegistrationsController
skip_before_action :require_no_authentication
before_action :check_if_gl_com
before_action :check_if_improved_trials_enabled
before_action :set_redirect_url, only: [:new]
before_action :skip_confirmation, only: [:create]
......@@ -41,10 +40,4 @@ class TrialRegistrationsController < RegistrationsController
def resource
@resource ||= Users::BuildService.new(current_user, sign_up_params).execute(skip_authorization: true)
end
def check_if_improved_trials_enabled
unless Feature.enabled?(:improved_trial_signup)
redirect_to("#{EE::SUBSCRIPTIONS_URL}/trials/new?gl_com=true")
end
end
end
......@@ -6,7 +6,6 @@ class TrialsController < ApplicationController
layout 'trial'
before_action :check_if_gl_com
before_action :check_if_improved_trials_enabled
before_action :authenticate_user!
before_action :find_or_create_namespace, only: :apply
......@@ -63,10 +62,6 @@ class TrialsController < ApplicationController
attrs
end
def check_if_improved_trials_enabled
render_404 unless Feature.enabled?(:improved_trial_signup)
end
def apply_trial_params
gl_com_params = { gitlab_com_trial: true, sync_to_gl: true }
......
......@@ -15,7 +15,6 @@ module EE
def trials_allowed?(user)
return unless user
return unless ::Gitlab.com?
return unless ::Feature.enabled?(:improved_trial_signup)
user.any_namespace_without_trial?
end
......
---
title: Improved trials sign up for gitlab.com
merge_request: 21650
author:
type: added
......@@ -10,18 +10,6 @@ describe TrialRegistrationsController do
allow(Gitlab).to receive(:com?).and_return(true)
end
context 'when feature is turned off' do
before do
stub_feature_flags(improved_trial_signup: false)
end
it 'redirects to subscription portal trial url' do
get :new
expect(response).to redirect_to("#{EE::SUBSCRIPTIONS_URL}/trials/new?gl_com=true")
end
end
context 'when customer is authenticated' do
before do
sign_in(user)
......@@ -70,19 +58,6 @@ describe TrialRegistrationsController do
end
end
context 'when feature is turned off' do
before do
allow(Gitlab).to receive(:com?).and_return(true)
stub_feature_flags(improved_trial_signup: false)
end
it 'returns not found' do
post :create, params: { user: user_params }
expect(response).to redirect_to("#{EE::SUBSCRIPTIONS_URL}/trials/new?gl_com=true")
end
end
context 'when valid' do
before do
allow(Gitlab).to receive(:com?).and_return(true)
......
......@@ -13,7 +13,6 @@ describe TrialsController do
before do
allow(::Gitlab).to receive(:com?).and_return(true)
stub_feature_flags(improved_trial_signup: true)
end
describe '#new' do
......@@ -28,16 +27,6 @@ describe TrialsController do
expect(response.status).to eq(404)
end
end
context 'when feature is turned off' do
it 'returns 404 not found' do
stub_feature_flags(improved_trial_signup: false)
get :new
expect(response.status).to eq(404)
end
end
end
describe '#create_lead' do
......
......@@ -7,7 +7,6 @@ describe 'Trial Sign In' do
describe 'on GitLab.com' do
before do
stub_feature_flags(improved_trial_signup: true)
allow(Gitlab).to receive(:com?).and_return(true).at_least(:once)
end
......
......@@ -7,7 +7,6 @@ describe 'Trial Sign Up', :js do
describe 'on GitLab.com' do
before do
stub_feature_flags(improved_trial_signup: true)
allow(Gitlab).to receive(:com?).and_return(true).at_least(:once)
end
......
......@@ -7,7 +7,6 @@ describe 'Trial Capture Lead', :js do
let(:user) { create(:user) }
before do
stub_feature_flags(improved_trial_signup: true)
allow(Gitlab).to receive(:com?).and_return(true).at_least(:once)
sign_in(user)
end
......
......@@ -9,7 +9,6 @@ describe 'Trial Select Namespace', :js do
let(:user) { create(:user) }
before do
stub_feature_flags(improved_trial_signup: true)
allow(Gitlab).to receive(:com?).and_return(true).at_least(:once)
sign_in(user)
end
......
......@@ -9,23 +9,15 @@ describe UsersHelper do
subject(:items) { helper.current_user_menu_items }
where(:user?, :gitlab_com?, :improved_trial_signup_feature_enabled?, :user_eligible?, :should_include_start_trial?) do
true | true | true | true | true
true | true | true | false | false
true | true | false | true | false
true | true | false | false | false
true | false | true | true | false
true | false | true | false | false
true | false | false | true | false
true | false | false | false | false
false | true | true | true | false
false | true | true | false | false
false | true | false | true | false
false | true | false | false | false
false | false | true | true | false
false | false | true | false | false
false | false | false | true | false
false | false | false | false | false
where(:user?, :gitlab_com?, :user_eligible?, :should_include_start_trial?) do
true | true | true | true
true | true | false | false
true | false | true | false
true | false | false | false
false | true | true | false
false | true | false | false
false | false | true | false
false | false | false | false
end
with_them do
......@@ -34,7 +26,6 @@ describe UsersHelper do
allow(helper).to receive(:can?).and_return(false)
allow(::Gitlab).to receive(:com?) { gitlab_com? }
stub_feature_flags(improved_trial_signup: improved_trial_signup_feature_enabled?)
allow(user).to receive(:any_namespace_without_trial?) { user_eligible? }
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