Sha256: 606adb25dd9b207a4e9530a60d14e8bcf55694488b53f336d17a57d1304eb492

Contents?: true

Size: 557 Bytes

Versions: 17

Compression:

Stored size: 557 Bytes

Contents

class UserMailerTest < ActionMailer::TestCase
  setup do
    @user = guts_users :admin_user
  end
  
  test 'should send reset' do
    email = Guts::UserMailer.password_reset(@user).deliver_now
    
    assert_not ActionMailer::Base.deliveries.empty?
    assert_equal ['from@example.com'], email.from
    assert_equal [@user.email], email.to
    assert_equal 'Reset Password', email.subject
    assert_match %r{/reset_password\/[0-9a-zA-Z]+}, email.text_part.body.to_s
    assert_match %r{/reset_password\/[0-9a-zA-Z]+}, email.html_part.body.to_s
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
guts-2.1.0 test/mailers/guts/user_mailer_test.rb
guts-2.0.2 test/mailers/guts/user_mailer_test.rb
guts-2.0.1 test/mailers/guts/user_mailer_test.rb
guts-2.0.0 test/mailers/guts/user_mailer_test.rb
guts-1.4.0 test/mailers/guts/user_mailer_test.rb
guts-1.3.6 test/mailers/guts/user_mailer_test.rb
guts-1.3.5 test/mailers/guts/user_mailer_test.rb
guts-1.3.4 test/mailers/guts/user_mailer_test.rb
guts-1.3.3 test/mailers/guts/user_mailer_test.rb
guts-1.3.2 test/mailers/guts/user_mailer_test.rb
guts-1.3.1 test/mailers/guts/user_mailer_test.rb
guts-1.3.0 test/mailers/guts/user_mailer_test.rb
guts-1.2.2 test/mailers/guts/user_mailer_test.rb
guts-1.2.1 test/mailers/guts/user_mailer_test.rb
guts-1.2.0 test/mailers/guts/user_mailer_test.rb
guts-1.1.1 test/mailers/guts/user_mailer_test.rb
guts-1.1.0 test/mailers/guts/user_mailer_test.rb