require "test_helper" class FormMailerTest < ActionMailer::TestCase test "received" do mail = FormMailer.received assert_equal "Received", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end end