summaryrefslogtreecommitdiff
path: root/spec/mailers/notify_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/mailers/notify_spec.rb
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
downloadgitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
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