Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class User < ActiveRecord::Base
# Omitted
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
end
test 'send_devise_notification queues into activejob' do
@user.save
assert_equal enqueued_jobs.size, 1 # Passes
assert_equal Sidekiq::Extensions::DelayedMailer.jobs.size, 1 #Fails
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment