diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:08:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:08:27 +0000 |
commit | 377d420e3d7e3f066c409714cbb9f7bb0a4882b6 (patch) | |
tree | 4ba0cb1b9487bf386c3c0e5d76a2191f285b6243 /spec/controllers/registrations_controller_spec.rb | |
parent | bc9b43904d491c7b864c8fb6ba06ae0f6625db0d (diff) | |
download | gitlab-ce-377d420e3d7e3f066c409714cbb9f7bb0a4882b6.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.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 0770f34d9de..699052fe37a 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -167,6 +167,16 @@ RSpec.describe RegistrationsController do expect(controller.current_user).to be_nil end + it 'tracks an almost there redirect' do + post_create + + expect_snowplow_event( + category: described_class.name, + action: 'render', + user: User.find_by(email: base_user_params[:email]) + ) + end + context 'when registration is triggered from an accepted invite' do context 'when it is part from the initial invite email', :snowplow do let_it_be(:member) { create(:project_member, :invited, invite_email: user_params.dig(:user, :email)) } @@ -260,6 +270,16 @@ RSpec.describe RegistrationsController do expect(response).to redirect_to(users_sign_up_welcome_path) end + it 'does not track an almost there redirect' do + post_create + + expect_no_snowplow_event( + category: described_class.name, + action: 'render', + user: User.find_by(email: base_user_params[:email]) + ) + end + context 'when invite email matches email used on registration' do let(:session_params) { { invite_email: user_params.dig(:user, :email) } } |