Sha256: ae6ac02fda1f46787634c36f46594d6d36c5548a5ae0695c22cd0424183cf656
Contents?: true
Size: 1005 Bytes
Versions: 24
Compression:
Stored size: 1005 Bytes
Contents
require 'test/helper' class TypusMailerTest < ActiveSupport::TestCase def setup @user = typus_users(:admin) ActionMailer::Base.default_url_options[:host] = 'test.host' @response = TypusMailer.deliver_reset_password_link(@user) end def test_should_verify_email_from_is_defined_by_typus_options assert_equal [ Typus::Configuration.options[:email] ], @response.from end def test_should_verify_email_to_is_typus_user_email assert_equal [ @user.email ], @response.to end def test_should_verify_email_subject expected = "[#{Typus::Configuration.options[:app_name]}] Reset password" assert_equal expected, @response.subject end def test_should_verify_email_contains_reset_password_link_with_token expected = "http://test.host/admin/reset_password?token=1A2B3C4D5E6F" assert_match expected, @response.body end def test_should_check_email_contains_signature assert_match /--\n#{Typus::Configuration.options[:app_name]}/, @response.body end end
Version data entries
24 entries across 24 versions & 2 rubygems