class UserPreview < ActionMailer::Preview
  def password_reset
    UserMailer.password_reset(user)
  end

  def project_invitation
    UserMailer.project_invitation(user, project, user_is_new: true)
  end

  def welcome
    UserMailer.welcome(user)
  end

  private

  def account
    OpenStruct.new(name: "Preview Account")
  end

  def user
    OpenStruct.new(email: "preview@test.com", password_reset_token: "123abc", account: account)
  end

  def project
    OpenStruct.new(name: "Preview Project", account: account)
  end
end
