How to check the sidekiq queue
14:38 01 Feb 2017

In a separate tab, I'm running

bundle exec sidekiq

and in another tab I'm running:

SendWithUsInviteeMailerJob.perform_async(invitee.id)

which kicks off a job that is here:

class SendWithUsInviteeMailerJob
  include Sidekiq::Worker
  sidekiq_options queue: :mailer, retry: 2

  def perform(invitee_id)
    SendWithUsInviteeMailer.welcome(invitee_id).deliver
  end
end

How do I determine if this job is enqueued in sidekiq? Say this is a test environment. I basically want to see that this job was enqueued for the purposes of a test.

Here's my gemfile:

... gem 'sidekiq' gem 'redis' ...

and in my spec_helper:

require 'sidekiq/testing'

  config.before(:each) do
    Sidekiq::Worker.clear_all
  end
end

Sidekiq::Testing.fake!
ruby-on-rails-4 sidekiq