require "test_helper" class VoteMailerTest < ActionMailer::TestCase test "daily_report_email" do mail = VoteMailer.daily_report_email assert_equal "Daily report email", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end end