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>2022-05-09 12:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-09 12:08:47 +0300
commitba689154ab9781ee7924be1b9e3ddd553ce84056 (patch)
treeb5a8625ece97ca37b4c3cb0455268337e7725a30 /spec/mailers
parent477c7a6cc129d12e5a1818572e900958c729c062 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/projects_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/mailers/emails/projects_spec.rb b/spec/mailers/emails/projects_spec.rb
index b9c71e35bc6..ef3c21b32ce 100644
--- a/spec/mailers/emails/projects_spec.rb
+++ b/spec/mailers/emails/projects_spec.rb
@@ -180,4 +180,32 @@ RSpec.describe Emails::Projects do
end
end
end
+
+ describe '.inactive_project_deletion_warning_email' do
+ let(:recipient) { user }
+ let(:deletion_date) { "2022-01-10" }
+
+ subject { Notify.inactive_project_deletion_warning_email(project, user, deletion_date) }
+
+ it_behaves_like 'an email sent to a user'
+ it_behaves_like 'an email sent from GitLab'
+ it_behaves_like 'it should not have Gmail Actions links'
+ it_behaves_like 'a user cannot unsubscribe through footer link'
+ it_behaves_like 'appearance header and footer enabled'
+ it_behaves_like 'appearance header and footer not enabled'
+
+ it 'has the correct subject and body' do
+ project_link = "<a href=\"#{project.http_url_to_repo}\">#{project.name}</a>"
+
+ is_expected.to have_subject("#{project.name} | Action required: Project #{project.name} is scheduled to be " \
+ "deleted on 2022-01-10 due to inactivity")
+ is_expected.to have_body_text(project.http_url_to_repo)
+ is_expected.to have_body_text("Due to inactivity, the #{project_link} project is scheduled to be deleted " \
+ "on <b>2022-01-10</b>")
+ is_expected.to have_body_text("To ensure #{project_link} is unscheduled for deletion, check that activity has " \
+ "been logged by GitLab")
+ is_expected.to have_body_text("This email supersedes any previous emails about scheduled deletion you may " \
+ "have received for #{project_link}.")
+ end
+ end
end