diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-06 13:47:05 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-06 13:47:05 +0200 |
commit | 5cf56e56470e695b10db02dff70d0f0b50060518 (patch) | |
tree | d46ecd17857f8e49abda15c03576c099e2bf39df /spec/mailers/repository_check_mailer_spec.rb | |
parent | e3558ed67e7e829fe5148c3fb2fe80ed045fe1b4 (diff) | |
download | gitlab-ce-5cf56e56470e695b10db02dff70d0f0b50060518.tar.gz |
Rename almost all the things
Diffstat (limited to 'spec/mailers/repository_check_mailer_spec.rb')
-rw-r--r-- | spec/mailers/repository_check_mailer_spec.rb | 21 |
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 |