dedicated_sidekiq_queue_spec.rb 407 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
require 'spec_helper'

describe DedicatedSidekiqQueue do
  let(:worker) do
    Class.new do
      def self.name
        'Foo::Bar::DummyWorker'
      end

      include Sidekiq::Worker
      include DedicatedSidekiqQueue
    end
  end

  describe 'queue names' do
    it 'sets the queue name based on the class name' do
      expect(worker.sidekiq_options['queue']).to eq('foo_bar_dummy')
    end
  end
end