Remove unused EmailJobQueue
This commit is contained in:
parent
26a262599d
commit
fe9339fccc
3 changed files with 0 additions and 32 deletions
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue