require "test_helper" class NotificationMailerTest < ActionMailer::TestCase test "expiration_in_60d" do mail = NotificationMailer.expiration_in_60d assert_equal "Expiration in 60d", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end test "expiration_in_30d" do mail = NotificationMailer.expiration_in_30d assert_equal "Expiration in 30d", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end test "expired" do mail = NotificationMailer.expired assert_equal "Expired", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end test "expired_30d_ago" do mail = NotificationMailer.expired_30d_ago assert_equal "Expired 30d ago", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end test "expired_60d_ago" do mail = NotificationMailer.expired_60d_ago assert_equal "Expired 60d ago", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end test "cancelled" do mail = NotificationMailer.cancelled assert_equal "Cancelled", mail.subject assert_equal ["to@example.org"], mail.to assert_equal ["from@example.com"], mail.from assert_match "Hi", mail.body.encoded end end