skill-assessment-app/test/mailers/previews/user_mailer_preview.rb
2017-03-06 16:12:31 -06:00

15 lines
439 B
Ruby

# frozen_string_literal: true
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailerPreview < ActionMailer::Preview
def password_reset
user = User.find_by(email: 'alan.admin@mailinator.com')
user.send(:gen_reset_token)
UserMailer.password_reset user
end
def welcome
user = User.find_by(email: 'alan.admin@mailinator.com')
UserMailer.welcome user, '[default-password]'
end
end