Sha256: 60aeb2452ca85197fb717a9da8d28830b9b704a1d3a3e337b2faaf7b32eb98f4
Contents?: true
Size: 830 Bytes
Versions: 8
Compression:
Stored size: 830 Bytes
Contents
require "test_helper" class Admin::MailerTest < ActiveSupport::TestCase setup do @typus_user = Factory(:typus_user) @url = "http://test.host/admin/account/#{@typus_user.token}" @email = Admin::Mailer.reset_password_link(@typus_user, @url) end should "verify email from is nil by default" do assert Admin::Mailer.default[:from].nil? end should "verify email to is typus user email" do assert @email.to.include?(@typus_user.email) end should "verify email subject" do expected = "[#{Typus.admin_title}] Reset password" assert_equal expected, @email.subject end should "verify default email mime type" do assert_equal "text/plain", @email.mime_type end should "verify email contains reset password link with token" do assert_match @url, @email.body.encoded end end
Version data entries
8 entries across 8 versions & 1 rubygems