2015-10-08 19:16:33 -05:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class AccountMailerTest < ActionMailer::TestCase
|
2015-10-08 21:10:33 -05:00
|
|
|
test "activation_needed_email" do
|
|
|
|
user = Person.new
|
|
|
|
mail = AccountMailer.activation_needed_email user
|
|
|
|
assert_equal "Activation needed email", mail.subject
|
|
|
|
assert_match "Hi", mail.body.encoded
|
|
|
|
# assert_equal ["to@example.org"], mail.to
|
|
|
|
# assert_equal ["from@example.com"], mail.from
|
|
|
|
end
|
|
|
|
|
|
|
|
test "activation_success_email" do
|
|
|
|
user = Person.new
|
|
|
|
mail = AccountMailer.activation_success_email user
|
|
|
|
assert_equal "Activation success email", mail.subject
|
|
|
|
assert_match "Hi", mail.body.encoded
|
|
|
|
# assert_equal ["to@example.org"], mail.to
|
|
|
|
# assert_equal ["from@example.com"], mail.from
|
|
|
|
end
|
2015-10-08 19:16:33 -05:00
|
|
|
end
|