Skip to content

Commit

Permalink
fix: correct link to error log mailer and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Aug 27, 2024
1 parent d170b31 commit 312f22e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
File renamed without changes.
19 changes: 19 additions & 0 deletions test/mailers/error_log_mailer_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'test_helper'
require 'grade_helper'

class ErrorLogMailerTest < ActionMailer::TestCase

def test_can_send_error_log_mail
Doubtfire::Application.config.email_errors_to = 'test <[email protected]>'
begin
raise 'test'
rescue StandardError => e
mail = ErrorLogMailer.error_message('test', 'test message', e)
end

assert mail.present?
assert mail.to.include? '[email protected]'
assert mail.body.include? e.message
assert mail.body.include? e.backtrace.join("\n")
end
end

0 comments on commit 312f22e

Please sign in to comment.