Skip to content

Instantly share code, notes, and snippets.

@sunnyrjuneja
Created January 30, 2015 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunnyrjuneja/0fb1a69ae346414469fd to your computer and use it in GitHub Desktop.
Save sunnyrjuneja/0fb1a69ae346414469fd to your computer and use it in GitHub Desktop.
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