Sha256: 630da57ef2a8e37cb3d1a112655c1c4add8a5f252328639c3c4b0fdc630f5fdb

Contents?: true

Size: 604 Bytes

Versions: 7

Compression:

Stored size: 604 Bytes

Contents

require "test_helper"

class Admin::MailerTest < ActiveSupport::TestCase

  test "reset_password_link" do
    @typus_user = Factory.build(:typus_user, :token => "qswed3-64g3fb")
    @url = "http://test.host/admin/account/#{@typus_user.token}"
    @email = Admin::Mailer.reset_password_link(@typus_user, @url)

    assert_nil Admin::Mailer.default[:from]
    assert @email.to.include?(@typus_user.email)

    expected = "[#{Typus.admin_title}] Reset password"
    assert_equal expected, @email.subject
    assert_equal "text/plain", @email.mime_type

    assert_match @url, @email.body.encoded
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
typus-3.1.0.rc7 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc6 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc5 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc4 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc3 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc2 test/app/mailers/admin/mailer_test.rb
typus-3.1.0.rc1 test/app/mailers/admin/mailer_test.rb