Remove old GenericMailJob
This commit is contained in:
parent
2d28f4023c
commit
26a262599d
2 changed files with 0 additions and 36 deletions
|
@ -1,21 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
module JobTypes
|
||||
class GenericMailJob < EmailJob
|
||||
attr_reader :from_email, :from_name, :message, :subject, :to_email, :to_name
|
||||
|
||||
def initialize(from_email, from_name, message, subject, to_email, to_name)
|
||||
@from_email = from_email
|
||||
@from_name = from_name
|
||||
@message = message
|
||||
@subject = subject
|
||||
@to_email = to_email
|
||||
@to_name = to_name
|
||||
end
|
||||
|
||||
def perform
|
||||
GenericMailer.generic_mail(@from_email, @from_name, @message, @subject, @to_email, @to_name).deliver
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
require 'rails_helper.rb'
|
||||
|
||||
describe JobTypes::GenericMailJob do
|
||||
describe '.perform' do
|
||||
it 'calls the correct active mailer' do
|
||||
expect(GenericMailer).to receive(:generic_mail).with(1, 2, 3, 4, 5, 6).and_wrap_original { |_m, *_args| mailer = double('object'); expect(mailer).to receive(:deliver).and_return(nil); mailer }
|
||||
|
||||
job = JobTypes::GenericMailJob.new(1, 2, 3, 4, 5, 6)
|
||||
job.perform
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue