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:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-06 14:47:05 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-06 14:47:05 +0300
commit5cf56e56470e695b10db02dff70d0f0b50060518 (patch)
treed46ecd17857f8e49abda15c03576c099e2bf39df /spec/mailers/repository_check_mailer_spec.rb
parente3558ed67e7e829fe5148c3fb2fe80ed045fe1b4 (diff)
Rename almost all the things
Diffstat (limited to 'spec/mailers/repository_check_mailer_spec.rb')
-rw-r--r--spec/mailers/repository_check_mailer_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/mailers/repository_check_mailer_spec.rb b/spec/mailers/repository_check_mailer_spec.rb
new file mode 100644
index 00000000000..6ae9a93aaac
--- /dev/null
+++ b/spec/mailers/repository_check_mailer_spec.rb
@@ -0,0 +1,21 @@
+require 'rails_helper'
+
+describe RepositoryCheckMailer do
+ include EmailSpec::Matchers
+
+ describe '.notify' do
+ it 'emails all admins' do
+ admins = 3.times.map { create(:admin) }
+
+ mail = described_class.notify(1)
+
+ expect(mail).to deliver_to admins.map(&:email)
+ end
+
+ it 'mentions the number of failed checks' do
+ mail = described_class.notify(3)
+
+ expect(mail).to have_subject '3 projects failed their last repository check'
+ end
+ end
+end