mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-21 00:47:26 +00:00
This construct was previously used in Spree to switch out the user class with a dummy class during certain tests. We don't use this any more, so it's just mess.
🔥
12 lines
353 B
Ruby
12 lines
353 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
class TestMailer < BaseMailer
|
|
def test_email(user)
|
|
recipient = user.respond_to?(:id) ? user : Spree::User.find(user)
|
|
subject = "#{Spree::Config[:site_name]} #{t('spree.test_mailer.test_email.subject')}"
|
|
mail(to: recipient.email, from: from_address, subject: subject)
|
|
end
|
|
end
|
|
end
|