summaryrefslogtreecommitdiff
path: root/spec/lib/marginalia_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/marginalia_spec.rb')
-rw-r--r--spec/lib/marginalia_spec.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/spec/lib/marginalia_spec.rb b/spec/lib/marginalia_spec.rb
index 040f70236c6..dd57cd7980e 100644
--- a/spec/lib/marginalia_spec.rb
+++ b/spec/lib/marginalia_spec.rb
@@ -89,21 +89,7 @@ RSpec.describe 'Marginalia spec' do
end
end
- describe 'for ActionMailer delivery jobs' do
- # We need to ensure that this runs through Sidekiq to take
- # advantage of the middleware. There is a Rails bug that means we
- # have to do some extra steps to make this happen:
- # https://github.com/rails/rails/issues/37270#issuecomment-553927324
- around do |example|
- descendants = ActiveJob::Base.descendants + [ActiveJob::Base]
- descendants.each(&:disable_test_adapter)
- ActiveJob::Base.queue_adapter = :sidekiq
-
- example.run
-
- descendants.each { |a| a.queue_adapter = :test }
- end
-
+ describe 'for ActionMailer delivery jobs', :sidekiq_mailers do
let(:delivery_job) { MarginaliaTestMailer.first_user.deliver_later }
let(:recorded) do