summaryrefslogtreecommitdiff
path: root/spec/controllers/registrations_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 12:08:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 12:08:33 +0000
commit1808454313ed75c92e1384466e8c83bfbc8ae25e (patch)
tree5c006c158fd796dc6d21e9bd771542f2fb0c24e2 /spec/controllers/registrations_controller_spec.rb
parentfd3a95f07ae9cd78fecffcfa5de4494f933a7808 (diff)
downloadgitlab-ce-1808454313ed75c92e1384466e8c83bfbc8ae25e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/registrations_controller_spec.rb')
-rw-r--r--spec/controllers/registrations_controller_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index 792219d830d..d7fe3e87056 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -415,4 +415,36 @@ describe RegistrationsController do
patch :update_registration, params: { user: { role: 'software_developer', setup_for_company: 'false' } }
end
end
+
+ describe '#welcome' do
+ subject { get :welcome }
+
+ before do
+ sign_in(create(:user))
+ end
+
+ context 'signup_flow experiment enabled' do
+ before do
+ stub_experiment_for_user(signup_flow: true)
+ end
+
+ it 'renders the devise_experimental_separate_sign_up_flow layout' do
+ expected_layout = Gitlab.ee? ? :checkout : :devise_experimental_separate_sign_up_flow
+
+ expect(subject).to render_template(expected_layout)
+ end
+ end
+
+ context 'signup_flow experiment disabled' do
+ before do
+ stub_experiment_for_user(signup_flow: false)
+ end
+
+ it 'renders the devise layout' do
+ expected_layout = Gitlab.ee? ? :checkout : :devise
+
+ expect(subject).to render_template(expected_layout)
+ end
+ end
+ end
end