d5a469d736
completes #25
21 lines
473 B
Ruby
21 lines
473 B
Ruby
require 'test_helper'
|
|
|
|
class UserMailerTest < ActionMailer::TestCase
|
|
test "password_reset" do
|
|
user = users(:admin)
|
|
user.setup_reset
|
|
mail = UserMailer.password_reset user
|
|
|
|
assert_equal [user.email], mail.to
|
|
assert_match user.reset_token, mail.body.encoded
|
|
end
|
|
|
|
test "welcome" do
|
|
user = users(:admin)
|
|
mail = UserMailer.welcome user, 'p0o9i8u7'
|
|
|
|
assert_equal [user.email], mail.to
|
|
assert_match 'p0o9i8u7', mail.body.encoded
|
|
end
|
|
end
|