Sha256: f8e648bae70c21519124e0e7840d8fc54b49f819e59cf2e34dc9a3001a906206
Contents?: true
Size: 868 Bytes
Versions: 17
Compression:
Stored size: 868 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 end
Version data entries
17 entries across 17 versions & 1 rubygems