diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/controllers/invites_controller_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/controllers/invites_controller_spec.rb')
-rw-r--r-- | spec/controllers/invites_controller_spec.rb | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 75a972d2f95..2d13b942c31 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -9,13 +9,6 @@ RSpec.describe InvitesController, :snowplow do let(:project_members) { member.source.users } let(:md5_member_global_id) { Digest::MD5.hexdigest(member.to_global_id.to_s) } let(:params) { { id: raw_invite_token } } - let(:snowplow_event) do - { - category: 'Growth::Acquisition::Experiment::InviteEmail', - label: md5_member_global_id, - property: group_type - } - end shared_examples 'invalid token' do context 'when invite token is not valid' do @@ -94,38 +87,6 @@ RSpec.describe InvitesController, :snowplow do expect(flash[:notice]).to be_nil end - context 'when new_user_invite is not set' do - it 'does not track the user as experiment group' do - request - - expect_no_snowplow_event - end - end - - context 'when new_user_invite is experiment' do - let(:params) { { id: raw_invite_token, new_user_invite: 'experiment' } } - let(:group_type) { 'experiment_group' } - - it 'tracks the user as experiment group' do - request - - expect_snowplow_event(**snowplow_event.merge(action: 'opened')) - expect_snowplow_event(**snowplow_event.merge(action: 'accepted')) - end - end - - context 'when new_user_invite is control' do - let(:params) { { id: raw_invite_token, new_user_invite: 'control' } } - let(:group_type) { 'control_group' } - - it 'tracks the user as control group' do - request - - expect_snowplow_event(**snowplow_event.merge(action: 'opened')) - expect_snowplow_event(**snowplow_event.merge(action: 'accepted')) - end - end - it_behaves_like "tracks the 'accepted' event for the invitation reminders experiment" it_behaves_like 'invalid token' end @@ -158,36 +119,6 @@ RSpec.describe InvitesController, :snowplow do subject(:request) { post :accept, params: params } - context 'when new_user_invite is not set' do - it 'does not track an event' do - request - - expect_no_snowplow_event - end - end - - context 'when new_user_invite is experiment' do - let(:params) { { id: raw_invite_token, new_user_invite: 'experiment' } } - let(:group_type) { 'experiment_group' } - - it 'tracks the user as experiment group' do - request - - expect_snowplow_event(**snowplow_event.merge(action: 'accepted')) - end - end - - context 'when new_user_invite is control' do - let(:params) { { id: raw_invite_token, new_user_invite: 'control' } } - let(:group_type) { 'control_group' } - - it 'tracks the user as control group' do - request - - expect_snowplow_event(**snowplow_event.merge(action: 'accepted')) - end - end - it_behaves_like "tracks the 'accepted' event for the invitation reminders experiment" it_behaves_like 'invalid token' end |