diff --git a/lib/email_job_queue.rb b/lib/email_job_queue.rb deleted file mode 100644 index 84e247bd..00000000 --- a/lib/email_job_queue.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -module EmailJobQueue - def self.queue(klass, *args) - Delayed::Job.enqueue klass.new(*args) - end -end diff --git a/spec/lib/email_job_queue_spec.rb b/spec/lib/email_job_queue_spec.rb deleted file mode 100644 index a912ad90..00000000 --- a/spec/lib/email_job_queue_spec.rb +++ /dev/null @@ -1,20 +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' - -describe EmailJobQueue do - let(:klass) { class_double('FakeClass') } - let(:fake_object) { instance_double('FakeClass') } - it 'handles empty args' do - expect(klass).to receive(:new).and_return(fake_object) - expect(Delayed::Job).to receive(:enqueue).with(fake_object) - EmailJobQueue.queue(klass) - end - - it 'handles other args' do - expect(klass).to receive(:new).with(1, 2).and_return(fake_object) - expect(Delayed::Job).to receive(:enqueue).with(fake_object) - EmailJobQueue.queue(klass, 1, 2) - end -end diff --git a/spec/support/expect.rb b/spec/support/expect.rb index d04f8539..e3b15b09 100644 --- a/spec/support/expect.rb +++ b/spec/support/expect.rb @@ -17,8 +17,4 @@ module Expect expect(list_of_errors.any? { |e| e[:key].to_s == i[:key].to_s && e[:name].to_s == i[:name].to_s }).to eq(true), "#{i[:key]} should have existed for #{i[:name]}" end end - - def expect_email_queued - expect(EmailJobQueue).to receive(:queue) - end end