failed_email_spec.rb 539 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe MonitoringHelper::HealthChecker::FailedEmail do
  4. let(:instance) { described_class.new }
  5. describe '#check_health' do
  6. it 'does nothing if directory missing' do
  7. expect(instance.check_health.issues).to be_blank
  8. end
  9. it 'adds issue if unprocessable mails found' do
  10. create(:failed_email)
  11. expect(instance.check_health.issues.first).to eq 'emails that could not be processed: 1'
  12. end
  13. end
  14. end