Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 15:08:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 15:08:53 +0300
commit110225407ff1476b102ae905ba2e9a01e5ab34a2 (patch)
tree0959369327271f807266606a882aaf479dc96e00 /spec/mailers/notify_spec.rb
parentb28d414aeffb5d1974747325a3be905dd42f2ad0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r--spec/mailers/notify_spec.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 8272b5d64c1..5d2b136043e 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -800,8 +800,7 @@ RSpec.describe Notify do
is_expected.to have_body_text project_member.invite_token
is_expected.to have_link('Join now',
href: invite_url(project_member.invite_token,
- invite_type: Emails::Members::INITIAL_INVITE,
- experiment_name: 'invite_email_preview_text'))
+ invite_type: Emails::Members::INITIAL_INVITE))
is_expected.to have_content("#{inviter.name} invited you to join the")
is_expected.to have_content('Project details')
is_expected.to have_content("What's it about?")
@@ -818,13 +817,25 @@ RSpec.describe Notify do
is_expected.to have_body_text project_member.invite_token
is_expected.to have_link('Join now',
href: invite_url(project_member.invite_token,
- invite_type: Emails::Members::INITIAL_INVITE,
- experiment_name: 'invite_email_preview_text'))
+ invite_type: Emails::Members::INITIAL_INVITE))
is_expected.to have_content('Project details')
is_expected.to have_content("What's it about?")
end
end
+ context 'with invite_email_preview_text enabled', :experiment do
+ before do
+ stub_experiments(invite_email_preview_text: :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_preview_text'))
+ end
+ end
+
context 'when invite email sent is tracked', :snowplow do
it 'tracks the sent invite' do
invite_email.deliver_now