Commit 684630e8 authored by Markus Koller's avatar Markus Koller

Merge branch 'nicolasdular/remove-successful-signup-notice' into 'master'

Remove successful signup flash message

See merge request gitlab-org/gitlab!42512
parents a757f50d dab1afd0
...@@ -12,7 +12,6 @@ module Registrations ...@@ -12,7 +12,6 @@ module Registrations
if current_user.save if current_user.save
hide_advanced_issues hide_advanced_issues
flash[:message] = I18n.t('devise.registrations.signed_up')
redirect_to group_path(params[:namespace_path]) redirect_to group_path(params[:namespace_path])
else else
render :show render :show
......
...@@ -36,7 +36,7 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -36,7 +36,7 @@ class RegistrationsController < Devise::RegistrationsController
end end
# Devise sets a flash message on `create` for a successful signup, # Devise sets a flash message on `create` for a successful signup,
# we want to show this message after the welcome page. # which we don't want to show.
flash[:notice] = nil flash[:notice] = nil
rescue Gitlab::Access::AccessDeniedError rescue Gitlab::Access::AccessDeniedError
redirect_to(new_user_session_path) redirect_to(new_user_session_path)
...@@ -69,7 +69,6 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -69,7 +69,6 @@ class RegistrationsController < Devise::RegistrationsController
return redirect_to new_users_sign_up_group_path if experiment_enabled?(:onboarding_issues) && show_onboarding_issues_experiment? return redirect_to new_users_sign_up_group_path if experiment_enabled?(:onboarding_issues) && show_onboarding_issues_experiment?
set_flash_message! :notice, :signed_up
redirect_to path_for_signed_in_user(current_user) redirect_to path_for_signed_in_user(current_user)
else else
render :welcome render :welcome
......
---
title: Remove successful signup flash message
merge_request: 42512
author:
type: changed
...@@ -59,8 +59,6 @@ RSpec.describe Registrations::ExperienceLevelsController do ...@@ -59,8 +59,6 @@ RSpec.describe Registrations::ExperienceLevelsController do
end end
context 'when user is successfully updated' do context 'when user is successfully updated' do
it { is_expected.to set_flash[:message].to('Welcome! You have signed up successfully.') }
context 'when no experience_level is sent' do context 'when no experience_level is sent' do
before do before do
user.user_preference.update_attribute(:experience_level, :novice) user.user_preference.update_attribute(:experience_level, :novice)
......
...@@ -493,10 +493,6 @@ RSpec.describe RegistrationsController do ...@@ -493,10 +493,6 @@ RSpec.describe RegistrationsController do
sign_in(create(:user)) sign_in(create(:user))
end end
it 'sets flash message' do it { is_expected.to redirect_to(dashboard_projects_path)}
subject
expect(flash[:notice]).to eq(I18n.t('devise.registrations.signed_up'))
end
end end
end end
...@@ -419,7 +419,6 @@ RSpec.shared_examples 'Signup' do ...@@ -419,7 +419,6 @@ RSpec.shared_examples 'Signup' do
expect(new_user.software_developer_role?).to be_truthy expect(new_user.software_developer_role?).to be_truthy
expect(new_user.setup_for_company).to be_nil expect(new_user.setup_for_company).to be_nil
expect(page).to have_current_path(new_project_path) expect(page).to have_current_path(new_project_path)
expect(page).to have_content("Welcome! You have signed up successfully.")
end 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