diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-25 12:10:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-25 12:10:52 +0300 |
commit | 326b4d3216d107b40142ee847c06f2c41a1ef220 (patch) | |
tree | f5190e9c606a92c0ed4ce606a52b49366055065e /spec/mailers/notify_spec.rb | |
parent | 92e4789eb069d5fe43025601c6b7839fddda3ad1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r-- | spec/mailers/notify_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 5d2b136043e..ecff5c15816 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -834,6 +834,35 @@ RSpec.describe Notify do invite_type: Emails::Members::INITIAL_INVITE, experiment_name: 'invite_email_preview_text')) end + + it 'tracks the sent invite' do + expect(experiment(:invite_email_preview_text)).to track(:assignment) + .with_context(actor: project_member) + .on_next_instance + + invite_email.deliver_now + end + end + + context 'with invite_email_from enabled', :experiment do + before do + stub_experiments(invite_email_from: :control) + end + + it 'has the correct invite_url with params' do + is_expected.to have_link('Join now', + href: invite_url(project_member.invite_token, + invite_type: Emails::Members::INITIAL_INVITE, + experiment_name: 'invite_email_from')) + end + + it 'tracks the sent invite' do + expect(experiment(:invite_email_from)).to track(:assignment) + .with_context(actor: project_member) + .on_next_instance + + invite_email.deliver_now + end end context 'when invite email sent is tracked', :snowplow do |