summaryrefslogtreecommitdiff
path: root/spec/mailers/notify_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mailers/notify_spec.rb')
-rw-r--r--spec/mailers/notify_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 53ce200eed5..89cf1aaedd2 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -905,6 +905,28 @@ RSpec.describe Notify do
is_expected.to have_body_text project.full_name
is_expected.to have_body_text project_member.human_access.downcase
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: Members::InviteEmailExperiment::INVITE_TYPE))
+ end
+
+ it 'contains invite link for the avatar', :experiment do
+ stub_experiments('members/invite_email': :avatar)
+
+ is_expected.not_to have_content('You are invited!')
+ is_expected.not_to have_body_text 'What is a GitLab'
+ end
+
+ it 'contains invite link for the avatar', :experiment do
+ stub_experiments('members/invite_email': :permission_info)
+
+ is_expected.not_to have_content('You are invited!')
+ is_expected.to have_body_text 'What is a GitLab'
+ is_expected.to have_body_text 'What can I do with'
+ end
+
+ it 'has invite link for the control group' do
+ stub_experiments('members/invite_email': :control)
+
+ is_expected.to have_content('You are invited!')
end
end